Permalink
Browse files

Conform to s-prefix change.

  • Loading branch information...
1 parent 9bd0bb2 commit 9588a1a4cfb39004527bb219bd390cbf888523ac @ElectricMagic ElectricMagic committed Apr 22, 2012
View
12 more/zoolib/javascriptcore/ZJavaScriptCore.cpp
@@ -268,11 +268,11 @@ String::String(const ZRef<JSStringRef>& iJSStringRef)
{}
String::String(const string8& iString8)
-: fRep(Adopt& ::JSStringCreateWithUTF8CString(iString8.c_str()))
+: fRep(sAdopt& ::JSStringCreateWithUTF8CString(iString8.c_str()))
{}
String::String(const string16& iString16)
-: fRep(Adopt& ::JSStringCreateWithCharacters(iString16.c_str(), iString16.length()))
+: fRep(sAdopt& ::JSStringCreateWithCharacters(iString16.c_str(), iString16.length()))
{}
String::operator JSStringRef() const
@@ -360,7 +360,7 @@ ZAny Value::AsAny() const
case kJSTypeString:
{
ZRef<JSStringRef> theStringRef =
- Adopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr);
+ sAdopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr);
return ZAny(spAsString8(theStringRef));
}
case kJSTypeObject:
@@ -488,7 +488,7 @@ Value& Value::operator=(const ObjectRef& iValue)
String Value::ToString() const
{
if (JSValueRef theRef = inherited::Get())
- return Adopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr);
+ return sAdopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr);
return String();
}
@@ -528,7 +528,7 @@ const ZQ<String> Value::QGet<String>() const
if (kJSTypeString == ::JSValueGetType(sCurrentContextRef(), theRef))
{
if (ZRef<JSStringRef> theStringRef =
- Adopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr))
+ sAdopt& ::JSValueToStringCopy(sCurrentContextRef(), theRef, nullptr))
{ return theStringRef; }
}
}
@@ -569,7 +569,7 @@ ZAny ObjectRef::AsAny() const
{
ZMap_Any result;
ZRef<JSPropertyNameArrayRef> theNames =
- Adopt& ::JSObjectCopyPropertyNames(sCurrentContextRef(), thisRef);
+ sAdopt& ::JSObjectCopyPropertyNames(sCurrentContextRef(), thisRef);
for (size_t x = 0, count = ::JSPropertyNameArrayGetCount(theNames); x < count; ++x)
{
const string8 theName =
View
8 more/zoolib/netscape/ZNetscape_GuestFactory.cpp
@@ -87,7 +87,7 @@ static NSModule spLoadNSModule(CFBundleRef iBundleRef)
{
// FIXME
// On 10.3+ we should use dlopen with RTLD_LOCAL.
- if (ZRef<CFURLRef> executableURL = Adopt& ::CFBundleCopyExecutableURL(iBundleRef))
+ if (ZRef<CFURLRef> executableURL = sAdopt& ::CFBundleCopyExecutableURL(iBundleRef))
{
char buff[PATH_MAX];
@@ -516,10 +516,10 @@ ZRef<ZNetscape::GuestFactory> ZNetscape::sMakeGuestFactory
#endif
#if ZCONFIG_SPI_Enabled(CoreFoundation)
- if (ZRef<CFURLRef> theURL = Adopt& ::CFURLCreateWithFileSystemPath
+ if (ZRef<CFURLRef> theURL = sAdopt& ::CFURLCreateWithFileSystemPath
(nullptr, ZUtil_CF::sString(iNativePath), kCFURLPOSIXPathStyle, true))
{
- if (ZMap_CF theMap = Adopt& ::CFBundleCopyInfoDictionaryInDirectory(theURL))
+ if (ZMap_CF theMap = sAdopt& ::CFBundleCopyInfoDictionaryInDirectory(theURL))
{
if (ZQ<int,false> theQ = spQGetMajorVersion(theMap))
{ return null; }
@@ -529,7 +529,7 @@ ZRef<ZNetscape::GuestFactory> ZNetscape::sMakeGuestFactory
{ return null; }
}
- if (ZRef<CFBundleRef> theBundleRef = Adopt& ::CFBundleCreate(nullptr, theURL))
+ if (ZRef<CFBundleRef> theBundleRef = sAdopt& ::CFBundleCreate(nullptr, theURL))
{
#if __MACH__
return new GuestFactory_HostMachO(theBundleRef);
View
4 more/zoolib/netscape/ZNetscape_Host_Mac.cpp
@@ -623,7 +623,7 @@ Host_HIViewRef::~Host_HIViewRef()
}
void Host_HIViewRef::Host_InvalidateRect(NPP npp, NPRect* rect)
- { ::HIViewSetNeedsDisplayInRect(fHIViewRef, ConstPtr& sRect<CGRect>(*rect), true); }
+ { ::HIViewSetNeedsDisplayInRect(fHIViewRef, sConstPtr& sRect<CGRect>(*rect), true); }
void Host_HIViewRef::PostCreateAndLoad()
{
@@ -825,7 +825,7 @@ OSStatus Host_HIViewRef::EventHandler_View(EventHandlerCallRef iCallRef, EventRe
newFrame = sRect(WH(newFrame));
::HIViewSetNeedsDisplayInRect
- (fHIViewRef, ConstPtr& sRect<CGRect>(newFrame), true);
+ (fHIViewRef, sConstPtr& sRect<CGRect>(newFrame), true);
newFrame = this->pApplyInsets(newFrame);
View
6 more/zoolib/photoshop/ZPhotoshop_Val.cpp
@@ -211,22 +211,22 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ \
PIActionReference theVal; \
if (noErr == SUITE->GetReference(P0, P1, &theVal)) \
- return Spec(Adopt(theVal)); \
+ return Spec(sAdopt(theVal)); \
break; \
} \
case typeValueList: \
{ \
PIActionList theVal; \
if (noErr == SUITE->GetList(P0, P1, &theVal)) \
- return Seq(Adopt(theVal)); \
+ return Seq(sAdopt(theVal)); \
break; \
} \
case typeObject: \
{ \
DescriptorClassID theDCID; \
PIActionDescriptor theVal; \
if (noErr == SUITE->GetObject(P0, P1, &theDCID, &theVal)) \
- return Map(theDCID, Adopt(theVal)); \
+ return Map(theDCID, sAdopt(theVal)); \
break; \
} \
/* global object? */ \
View
6 zoolib/ZMatrix.h
@@ -232,8 +232,9 @@ template <class E, size_t R>
ZMatrix<E,1,R-1> sCartesian(const ZMatrix<E,1,R>& iMat)
{
ZMatrix<E,1,R-1> result;
+ const E last = iMat.fE[0][R-1];
for (size_t r = 0; r < R - 1; ++r)
- result.fE[0][r] = iMat.fE[0][r];
+ result.fE[0][r] = iMat.fE[0][r]/last;
return result;
}
@@ -244,8 +245,9 @@ template <class E, size_t C>
ZMatrix<E,C-1,1> sCartesian(const ZMatrix<E,C,1>& iMat)
{
ZMatrix<E,C-1,1> result;
+ const E last = iMat.fE[C-1][0];
for (size_t c = 0; c < C - 1; ++c)
- result.fE[c][0] = iMat.fE[c][0];
+ result.fE[c][0] = iMat.fE[c][0]/last;
return result;
}
View
10 zoolib/ZStream_CGData.cpp
@@ -63,7 +63,7 @@ static CGDataProviderSequentialCallbacks spCallbacksSequential =
ZRef<CGDataProviderRef> ZStream_CGData::sCGDataProviderCreate(ZRef<ZStreamerR> iStreamer)
{
iStreamer->Retain();
- return Adopt& ::CGDataProviderCreateSequential(iStreamer.Get(), &spCallbacksSequential);
+ return sAdopt& ::CGDataProviderCreateSequential(iStreamer.Get(), &spCallbacksSequential);
}
#else // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
@@ -82,7 +82,7 @@ static CGDataProviderCallbacks spCallbacks_R =
ZRef<CGDataProviderRef> ZStream_CGData::sCGDataProviderCreate(ZRef<ZStreamerR> iStreamer)
{
iStreamer->Retain();
- return Adopt& ::CGDataProviderCreate(iStreamer, &spCallbacks_R);
+ return sAdopt& ::CGDataProviderCreate(iStreamer, &spCallbacks_R);
}
#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
@@ -127,7 +127,7 @@ static CGDataProviderSequentialCallbacks spCallbacksSequential_RPos =
ZRef<CGDataProviderRef> ZStream_CGData::sCGDataProviderCreateRewind(ZRef<ZStreamerRPos> iStreamer)
{
iStreamer->Retain();
- return Adopt& ::CGDataProviderCreateSequential(iStreamer.Get(), &spCallbacksSequential_RPos);
+ return sAdopt& ::CGDataProviderCreateSequential(iStreamer.Get(), &spCallbacksSequential_RPos);
}
#else // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
@@ -143,7 +143,7 @@ static CGDataProviderCallbacks spCallbacks_RPos =
ZRef<CGDataProviderRef> ZStream_CGData::sCGDataProviderCreateRewind(ZRef<ZStreamerRPos> iStreamer)
{
iStreamer->Retain();
- return Adopt& ::CGDataProviderCreate(iStreamer, &spCallbacks_RPos);
+ return sAdopt& ::CGDataProviderCreate(iStreamer, &spCallbacks_RPos);
}
#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
@@ -174,7 +174,7 @@ CGDataConsumerCallbacks spCallbacks_W =
ZRef<CGDataConsumerRef> ZStream_CGData::sCGDataConsumerCreate(ZRef<ZStreamerW> iStreamer)
{
iStreamer->Retain();
- return Adopt& ::CGDataConsumerCreate(iStreamer.Get(), &spCallbacks_W);
+ return sAdopt& ::CGDataConsumerCreate(iStreamer.Get(), &spCallbacks_W);
}
#endif // ZCONFIG_SPI_Enabled(CoreGraphics)
View
2 zoolib/ZUSB_OSX.cpp
@@ -95,7 +95,7 @@ ZUSBWatcher::ZUSBWatcher
: fIONotificationPortRef(iIONotificationPortRef)
, fNotification(0)
{
- ZMap_CF theMap = Adopt& ::IOServiceMatching(kIOUSBDeviceClassName);
+ ZMap_CF theMap = sAdopt& ::IOServiceMatching(kIOUSBDeviceClassName);
theMap.Set(kUSBVendorID, int32(iUSBVendor));
theMap.Set(kUSBProductID, int32(iUSBProduct));

0 comments on commit 9588a1a

Please sign in to comment.