aboutsummaryrefslogtreecommitdiff
path: root/DebugUtils
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-01-20 04:30:37 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-01-20 04:30:37 +0000
commit7d5ee793b998434f1f9524efab58363cce1f16dc (patch)
tree0f152c2948e9b057e2c9663af82440f60cacb864 /DebugUtils
parentfc67de3bc76a7e05fbf2df21c0d9e8c7f0a07771 (diff)
[Author: dmaclach]
Tighten up the type casting code a bit so it looks nicer. R=thomasvl DELTA=8 (0 added, 6 deleted, 2 changed)
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) {