• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Commit MetaInfo

Révisiond10ff95d3074ffc819728fc03fb63588db61f1d1 (tree)
l'heure2012-11-18 23:50:40
Auteurshom5xg <shom@.(no...>
Commitershom5xg

Message de Log

Add macro funcs "USING_PTR" and "SAFE_CALL".

Change Summary

Modification

--- a/util/src/util/pch/pch_common.h
+++ b/util/src/util/pch/pch_common.h
@@ -119,8 +119,11 @@ typedef std::basic_string<TCHAR> tstring;
119119 #define foreach BOOST_FOREACH
120120 //--
121121
122-//-- ifnot
122+//-- if-else
123123 #define ifnot( expr ) if( !( expr ) )
124+
125+#define USING_PTR( ptr ) if( ( ptr ) != NULL )
126+#define SAFE_CALL( ptr ) if( ( ptr ) != NULL ) ( ptr )
124127 //--
125128
126129 //-- UNUSED