Loading...
--- xnu/xnu-792.6.22/libkern/c++/OSBoolean.cpp
+++ xnu/xnu-201.19.3/libkern/c++/OSBoolean.cpp
@@ -76,12 +76,15 @@
assert(false);
}
-void OSBoolean::taggedRetain(const void *tag) const { }
-void OSBoolean::taggedRelease(const void *tag, const int when) const { }
-
OSBoolean *OSBoolean::withBoolean(bool inValue)
{
- return (inValue) ? kOSBooleanTrue : kOSBooleanFalse;
+ if (inValue) {
+ kOSBooleanTrue->retain();
+ return kOSBooleanTrue;
+ } else {
+ kOSBooleanFalse->retain();
+ return kOSBooleanFalse;
+ }
}
bool OSBoolean::isTrue() const { return value; }