diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-06-14 10:30:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 10:30:13 -0400 |
commit | 6fd164a3c5b8734f682b8028f6ec719fb8c3fe07 (patch) | |
tree | e496d130ef74e8a0bef6c82ece68abd5754aab8a /DebugUtils | |
parent | 03623a95a6be9adee2db1c195bb2cf991ac99464 (diff) | |
parent | 7b984f5a1c54dbe2dca310992c60e196337d9f5c (diff) |
Merge pull request #119 from thomasvl/cast_tweak
Improve the casing macros
Diffstat (limited to 'DebugUtils')
-rw-r--r-- | DebugUtils/GTMTypeCasting.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/DebugUtils/GTMTypeCasting.h b/DebugUtils/GTMTypeCasting.h index f53b3d2..0c5899f 100644 --- a/DebugUtils/GTMTypeCasting.h +++ b/DebugUtils/GTMTypeCasting.h @@ -1,14 +1,14 @@ // // GTMTypeCasting.h -// +// // Copyright 2010 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy // of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -58,14 +58,14 @@ GTM_INLINE id GTMStaticCastSupport(Class cls, id object) { #ifndef GTM_STATIC_CAST #ifdef DEBUG - #define GTM_STATIC_CAST(type, object) GTMStaticCastSupport([type class], \ - object) + #define GTM_STATIC_CAST(type, object) \ + ((type *) GTMStaticCastSupport([type class], object)) #else #define GTM_STATIC_CAST(type, object) ((type *) (object)) #endif #endif #ifndef GTM_DYNAMIC_CAST - #define GTM_DYNAMIC_CAST(type, object) GTMDynamicCastSupport([type class], \ - object) + #define GTM_DYNAMIC_CAST(type, object) \ + ((type *) GTMDynamicCastSupport([type class], object)) #endif |