aboutsummaryrefslogtreecommitdiff
path: root/DebugUtils
diff options
context:
space:
mode:
Diffstat (limited to 'DebugUtils')
-rw-r--r--DebugUtils/GTMTypeCasting.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/DebugUtils/GTMTypeCasting.h b/DebugUtils/GTMTypeCasting.h
index 1e9ebb9..6b3d2ef 100644
--- a/DebugUtils/GTMTypeCasting.h
+++ b/DebugUtils/GTMTypeCasting.h
@@ -47,14 +47,8 @@ extern "C" {
// Support functions for dealing with casting.
GTM_INLINE id GTMDynamicCastSupport(Class cls, id object) {
- id value = nil;
- if (object) {
- _GTMDevAssert(cls, @"Nil Class");
- if ([object isKindOfClass:cls]) {
- value = object;
- }
- }
- return value;
+ _GTMDevAssert(cls, @"Nil Class");
+ return [object isKindOfClass:cls] ? object : nil;
}
GTM_INLINE id GTMStaticCastSupport(Class cls, id object) {