[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52053] trunk/blender/source/gameengine: code cleanup: bge static functions & use C++ guarded alloc for the character class.

Campbell Barton ideasman42 at gmail.com
Sat Nov 10 00:47:07 CET 2012


Revision: 52053
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52053
Author:   campbellbarton
Date:     2012-11-09 23:47:06 +0000 (Fri, 09 Nov 2012)
Log Message:
-----------
code cleanup: bge static functions & use C++ guarded alloc for the character class.

Modified Paths:
--------------
    trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    trunk/blender/source/gameengine/Ketsji/KX_CharacterWrapper.h

Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp	2012-11-09 23:28:51 UTC (rev 52052)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp	2012-11-09 23:47:06 UTC (rev 52053)
@@ -172,7 +172,7 @@
 
 #endif /* WIN32 */
 
-void usage(const char* program, bool isBlenderPlayer)
+static void usage(const char* program, bool isBlenderPlayer)
 {
 	const char * consoleoption;
 	const char * example_filename = "";
@@ -332,7 +332,7 @@
 	return bfd;
 }
 
-bool GPG_NextFrame(GHOST_ISystem* system, GPG_Application *app, int &exitcode, STR_String &exitstring, GlobalSettings *gs)
+static bool GPG_NextFrame(GHOST_ISystem* system, GPG_Application *app, int &exitcode, STR_String &exitstring, GlobalSettings *gs)
 {
 	bool run = true;
 	system->processEvents(false);
@@ -352,7 +352,7 @@
 	GlobalSettings *gs;
 } gpg_nextframestate;
 
-int GPG_PyNextFrame(void *state0)
+static int GPG_PyNextFrame(void *state0)
 {
 	GPG_NextFrameState *state = (GPG_NextFrameState *) state0;
 	int exitcode;

Modified: trunk/blender/source/gameengine/Ketsji/KX_CharacterWrapper.h
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_CharacterWrapper.h	2012-11-09 23:28:51 UTC (rev 52052)
+++ trunk/blender/source/gameengine/Ketsji/KX_CharacterWrapper.h	2012-11-09 23:47:06 UTC (rev 52053)
@@ -30,6 +30,10 @@
 
 private:
 	PHY_ICharacter*			 m_character;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+	MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_CharacterWrapper")
+#endif
 };
 
 #endif //__KX_CHARACTERWRAPPER_H__




More information about the Bf-blender-cvs mailing list