Created
January 3, 2014 00:14
-
-
Save manucorporat/8229938 to your computer and use it in GitHub Desktop.
C++'s dynamic_cast implemented for Objective-C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DYNAMIC_CAST(__CLASS__, __OBJ__) ((__CLASS__*)([__OBJ__ isKindOfClass:[__CLASS__ class]] ? __OBJ__ : nil)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment