aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMObjectSingleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMObjectSingleton.h')
-rw-r--r--Foundation/GTMObjectSingleton.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Foundation/GTMObjectSingleton.h b/Foundation/GTMObjectSingleton.h
index 9bdeb0a..116d232 100644
--- a/Foundation/GTMObjectSingleton.h
+++ b/Foundation/GTMObjectSingleton.h
@@ -17,6 +17,8 @@
// the License.
//
+#import "GTMDefines.h"
+
/// This macro implements the various methods needed to make a safe singleton.
//
/// This Singleton pattern was taken from:
@@ -35,7 +37,7 @@ static _object_name_ *z##_shared_obj_name_ = nil; \
/* Note that 'self' may not be the same as _object_name_ */ \
/* first assignment done in allocWithZone but we must reassign in case init fails */ \
z##_shared_obj_name_ = [[self alloc] init]; \
- NSAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \
+ _GTMDevAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \
} \
} \
return z##_shared_obj_name_; \
@@ -49,7 +51,7 @@ static _object_name_ *z##_shared_obj_name_ = nil; \
} \
\
/* We can't return the shared instance, because it's been init'd */ \
- NSAssert(NO, @"use the singleton API, not alloc+init"); \
+ _GTMDevAssert(NO, @"use the singleton API, not alloc+init"); \
return nil; \
} \
- (id)retain { \