• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiond10ff95d3074ffc819728fc03fb63588db61f1d1 (tree)
Time2012-11-18 23:50:40
Authorshom5xg <shom@.(no...>
Commitershom5xg

Log Message

Add macro funcs "USING_PTR" and "SAFE_CALL".

Change Summary

Incremental Difference

--- 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