code cleanup: bge warnings
authorCampbell Barton <ideasman42@gmail.com>
Thu, 4 Apr 2013 23:16:23 +0000 (23:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 4 Apr 2013 23:16:23 +0000 (23:16 +0000)
22 files changed:
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Dilation2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Erosion2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Laplacian2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Prewitt2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Sepia2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Sharpen2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Sobel2DFilter.h
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/Texture.h

index 450ae1a16b570bbb0f8a636f099a48fc3cf415d9..426392305ab3e56efa7117ab586cbda762417280 100644 (file)
@@ -182,7 +182,7 @@ static int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWind
        return exitrequested;
 }
 
-struct BL_KetsjiNextFrameState {
+static struct BL_KetsjiNextFrameState {
        class KX_KetsjiEngine* ketsjiengine;
        struct bContext *C;
        struct wmWindow* win;
index 20c66bd7bc95d16c10bcc3331629e5aac254ae57..abab40cbe6705e4f584073d11df9496c4e00e4d0 100644 (file)
@@ -293,7 +293,7 @@ static PyObject *listvalue_buffer_item(PyObject *self, Py_ssize_t index)
        CValue *cval;
        
        if (list==NULL) {
-               PyErr_SetString(PyExc_SystemError, "val = CList[i], "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val = CList[i], " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -350,7 +350,7 @@ static PyObject *listvalue_mapping_subscript(PyObject *self, PyObject *key)
 {
        CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
        if (list==NULL) {
-               PyErr_SetString(PyExc_SystemError, "value = CList[i], "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "value = CList[i], " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -398,7 +398,7 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
        Py_ssize_t i, numitems, numitems_orig;
        
        if (listval==NULL) {
-               PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -447,7 +447,7 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
                CListValue* otherval = static_cast<CListValue *>(BGE_PROXY_REF(other));
                if (otherval==NULL) {
                        listval_new->Release();
-                       PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
+                       PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
                        return NULL;
                }
                
@@ -471,7 +471,7 @@ static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
        CListValue *self = static_cast<CListValue *>(BGE_PROXY_REF(self_v));
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "val in CList, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val in CList, " BGE_PROXY_ERROR_MSG);
                return -1;
        }
        
index 98da18dcc684296d23e91c347a3cbf1d5b80ac6e..172440cfcb6019371e71997e817f654bb320bb96 100644 (file)
@@ -1572,7 +1572,7 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype,
        return mathutils_kxgameob_vector_set(bmo, subtype);
 }
 
-Mathutils_Callback mathutils_kxgameob_vector_cb = {
+static Mathutils_Callback mathutils_kxgameob_vector_cb = {
        mathutils_kxgameob_generic_check,
        mathutils_kxgameob_vector_get,
        mathutils_kxgameob_vector_set,
@@ -1628,7 +1628,7 @@ static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype)
        return 0;
 }
 
-Mathutils_Callback mathutils_kxgameob_matrix_cb = {
+static Mathutils_Callback mathutils_kxgameob_matrix_cb = {
        mathutils_kxgameob_generic_check,
        mathutils_kxgameob_matrix_get,
        mathutils_kxgameob_matrix_set,
@@ -1800,7 +1800,7 @@ static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
        PyObject *pyconvert;
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -1834,7 +1834,7 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
                PyErr_Clear();
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, " BGE_PROXY_ERROR_MSG);
                return -1;
        }
        
@@ -1919,7 +1919,7 @@ static int Seq_Contains(PyObject *self_v, PyObject *value)
        KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, " BGE_PROXY_ERROR_MSG);
                return -1;
        }
        
index d02554e185ef0b746aacaeb4c9f7eed823efd117..9d6c8d250c7f771371d915294c7a299beb0b5706 100644 (file)
@@ -496,7 +496,7 @@ static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, i
        return mathutils_obactu_vector_set(bmo, subtype);
 }
 
-Mathutils_Callback mathutils_obactu_vector_cb = {
+static Mathutils_Callback mathutils_obactu_vector_cb = {
        mathutils_obactu_generic_check,
        mathutils_obactu_vector_get,
        mathutils_obactu_vector_set,
index 840ffdde165bbefc87ded31b787fdac34406129a..eaedc752201767e6fee1e39e733707277bb16b8a 100644 (file)
@@ -103,7 +103,7 @@ KX_PolyProxy::~KX_PolyProxy()
 // stuff for cvalue related things
 CValue*                KX_PolyProxy::Calc(VALUE_OPERATOR, CValue *) { return NULL;}
 CValue*                KX_PolyProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
-STR_String     sPolyName="polygone";
+static STR_String sPolyName = "polygone";
 const STR_String &     KX_PolyProxy::GetText() {return sPolyName;};
 double         KX_PolyProxy::GetNumber() { return -1;}
 STR_String&    KX_PolyProxy::GetName() { return sPolyName;}
index edbb0537559b2e12ffab32c7920e39c26dc190d3..fb3e6c58027fee1814d3616a0b0024ad4182b38b 100644 (file)
@@ -74,7 +74,7 @@ static Py_ssize_t KX_PythonSeq_len( PyObject *self )
        PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
 
        if (self_plus==NULL) {
-               PyErr_SetString(PyExc_SystemError, "len(seq): "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "len(seq): " BGE_PROXY_ERROR_MSG);
                return -1;
        }
        
@@ -105,7 +105,7 @@ static PyObject *KX_PythonSeq_getIndex(PyObject *self, Py_ssize_t index)
        PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
         
        if (self_plus==NULL) {
-               PyErr_SetString(PyExc_SystemError, "val = seq[i]: "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val = seq[i]: " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -269,7 +269,7 @@ static PyObject *KX_PythonSeq_subscript(PyObject *self, PyObject *key)
        PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
        
        if (self_plus==NULL) {
-               PyErr_SetString(PyExc_SystemError, "val = seq[key], KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val = seq[key], KX_PythonSeq: " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
@@ -299,7 +299,7 @@ static int KX_PythonSeq_contains(PyObject *self, PyObject *key)
        PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
        
        if (self_plus==NULL) {
-               PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: " BGE_PROXY_ERROR_MSG);
                return -1;
        }
        if (!PyUnicode_Check(key)) {
@@ -362,7 +362,7 @@ PyMethodDef KX_PythonSeq_methods[] = {
 static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self)
 {
        if (BGE_PROXY_REF(self->base)==NULL) {
-               PyErr_SetString(PyExc_SystemError, "for i in seq: "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "for i in seq: " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
        
index 92e064c6e91007f55ebab7e18e5f64307b927dc5..adc0aa194afd8d2345748aa613ee5a1c316e7a45 100644 (file)
@@ -2064,7 +2064,7 @@ static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
        PyObject *pyconvert;
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "val = scene[key]: KX_Scene, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val = scene[key]: KX_Scene, " BGE_PROXY_ERROR_MSG);
                return NULL;
        }
 
@@ -2094,7 +2094,7 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
                PyErr_Clear();
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "scene[key] = value: KX_Scene, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "scene[key] = value: KX_Scene, " BGE_PROXY_ERROR_MSG);
                return -1;
        }
 
@@ -2141,7 +2141,7 @@ static int Seq_Contains(PyObject *self_v, PyObject *value)
        KX_Scene* self = static_cast<KX_Scene*>BGE_PROXY_REF(self_v);
        
        if (self == NULL) {
-               PyErr_SetString(PyExc_SystemError, "val in scene: KX_Scene, "BGE_PROXY_ERROR_MSG);
+               PyErr_SetString(PyExc_SystemError, "val in scene: KX_Scene, " BGE_PROXY_ERROR_MSG);
                return -1;
        }
 
index e093b7cd722ce7f418d51d9b9e1b038b44c4f31d..79ce85382108dfb53272e85c9e0614741b772506 100644 (file)
@@ -24,7 +24,6 @@
  *  \ingroup bgerast
  */
 
 #define STRINGIFY(A)  #A
 
 #include "RAS_OpenGLFilters/RAS_Blur2DFilter.h"
index c2595fb0d269280433ed09e14cf5cbe977c2f5ea..3f1644a5c60740d8582eb05c146ac2e7b8948fe4 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_BLUR2DFILTER_H__
 #define __RAS_BLUR2DFILTER_H__
 
-const char * BlurFragmentShader=STRINGIFY(
+static const char *BlurFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
index 12b815a15196b078d5d8ec8cead0a4c1fa497903..4e863cb6f8d8ab441becd36510c8bbde64f75efa 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_DILATION2DFILTER_H__
 #define __RAS_DILATION2DFILTER_H__
 
-const char * DilationFragmentShader=STRINGIFY(
+static const char *DilationFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
index eaefd5c13fa1246950e6db10e62ca307753c1bf4..56e2c22fe2e7226819896867bc750c96a154cf3f 100644 (file)
@@ -32,9 +32,9 @@
 #ifndef __RAS_EROSION2DFILTER_H__
 #define __RAS_EROSION2DFILTER_H__
 
-const char * ErosionFragmentShader = STRINGIFY(
-            uniform sampler2D bgl_RenderedTexture;
-        uniform vec2 bgl_TextureCoordinateOffset[9];
+static const char *ErosionFragmentShader = STRINGIFY(
+uniform sampler2D bgl_RenderedTexture;
+uniform vec2 bgl_TextureCoordinateOffset[9];
 
 void main(void)
 {
index f3c3aece7d55e606e2c37dfe3a81f1c02a6f5708..932d5b16fed1b42d72dcd386b391a9e4e4bf1a0c 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_GRAYSCALE2DFILTER_H__
 #define __RAS_GRAYSCALE2DFILTER_H__
 
-const char * GrayScaleFragmentShader=STRINGIFY(
+static const char *GrayScaleFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 
 void main(void)
index c04d9543e89d4a8f1bd6b28948be56c3c64756e5..dce303916ea244e590d9b21efc0caf36bfa279b8 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_INVERT2DFILTER_H__
 #define __RAS_INVERT2DFILTER_H__
 
-const char * InvertFragmentShader=STRINGIFY(
+static const char *InvertFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 
 void main(void)
index 47f7d80d9d716407eed9a5467124d95915110af1..9ec5092817d50ea3f61463fdf11936b20360f6a6 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_LAPLACIAN2DFILTER_H__
 #define __RAS_LAPLACIAN2DFILTER_H__
 
-const char * LaplacionFragmentShader=STRINGIFY(
+static const char *LaplacionFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
index 8b2fdc71cfb9e308d4b3c10e85b3b592df834636..4ae6009fdeb42421f6716cb9bb4be2104ccc2c28 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_PREWITT2DFILTER_H__
 #define __RAS_PREWITT2DFILTER_H__
 
-const char * PrewittFragmentShader=STRINGIFY(
+static const char *PrewittFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
index b38d14a3746ddb7181afbdc5535fcc3aca5eacdc..16b4e71dfdbf3c5b576f8a83ddac6bee73148cdc 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_SEPIA2DFILTER_H__
 #define __RAS_SEPIA2DFILTER_H__
 
-const char * SepiaFragmentShader=STRINGIFY(
+static const char *SepiaFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 
 void main(void)
index 2e0edae61c4d95ea1b09e059a5ed3dd0dad5fe6e..7512393815b0708ccb8944f0900a3d33f6897830 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_SHARPEN2DFILTER_H__
 #define __RAS_SHARPEN2DFILTER_H__
 
-const char * SharpenFragmentShader=STRINGIFY(
+static const char *SharpenFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
@@ -53,4 +53,3 @@ void main(void)
 }
 );
 #endif
-
index ba30e4979230b78b4feb199479ca696df3d90813..088ac10a56a71cf6630c8119ab254c9dceaf2cae 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __RAS_SOBEL2DFILTER_H__
 #define __RAS_SOBEL2DFILTER_H__
 
-const char * SobelFragmentShader=STRINGIFY(
+static const char *SobelFragmentShader = STRINGIFY(
 uniform sampler2D bgl_RenderedTexture;
 uniform vec2 bgl_TextureCoordinateOffset[9];
 
index 016020048e93b8c6bccb001aa4a7920248c4a0ab..c5938b59e3e6dcbe879db67cee489adcc8702d36 100644 (file)
@@ -288,9 +288,9 @@ inline ImageRender * getImageRender (PyImage *self)
 // python methods
 
 // Blender Scene type
-BlendType<KX_Scene> sceneType ("KX_Scene");
+static BlendType<KX_Scene> sceneType ("KX_Scene");
 // Blender Camera type
-BlendType<KX_Camera> cameraType ("KX_Camera");
+static BlendType<KX_Camera> cameraType ("KX_Camera");
 
 
 // object initialization
@@ -398,8 +398,7 @@ static PyGetSetDef imageRenderGetSets[] =
 
 
 // define python type
-PyTypeObject ImageRenderType =
-{ 
+static PyTypeObject ImageRenderType = {
        PyVarObject_HEAD_INIT(NULL, 0)
        "VideoTexture.ImageRender",   /*tp_name*/
        sizeof(PyImage),          /*tp_basicsize*/
@@ -733,8 +732,7 @@ ImageRender::ImageRender (KX_Scene *scene, KX_GameObject *observer, KX_GameObjec
 
 
 // define python type
-PyTypeObject ImageMirrorType =
-{ 
+static PyTypeObject ImageMirrorType = {
        PyVarObject_HEAD_INIT(NULL, 0)
        "VideoTexture.ImageMirror",   /*tp_name*/
        sizeof(PyImage),          /*tp_basicsize*/
index 19d0289be200f5ddbab7159ff1214646b5d4f0cd..480a592930a0b8fd9841d2cde83404f9de91a597 100644 (file)
@@ -358,8 +358,7 @@ static PyGetSetDef imageViewportGetSets[] =
 
 
 // define python type
-PyTypeObject ImageViewportType =
-{ 
+static PyTypeObject ImageViewportType = {
        PyVarObject_HEAD_INIT(NULL, 0)
        "VideoTexture.ImageViewport",   /*tp_name*/
        sizeof(PyImage),          /*tp_basicsize*/
index ebad7a924371cf9fe76ba601590d6800c797b3cf..aebc2aeef0117411b0f74cb0cc3363081217b91d 100644 (file)
@@ -63,8 +63,8 @@
 
 
 // Blender GameObject type
-BlendType<KX_GameObject> gameObjectType ("KX_GameObject");
-BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
+static BlendType<KX_GameObject> gameObjectType ("KX_GameObject");
+static BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
 
 
 // load texture
index 157eea56c09961eb5dde8766c5b6fe9d307bace6..c85b1228864c349856b135dfa7663e3877760c2e 100644 (file)
@@ -94,7 +94,4 @@ short getMaterialID(PyObject *obj, const char *name);
 // Exceptions
 extern ExceptionID MaterialNotAvail;
 
-// object type
-extern BlendType<KX_GameObject> gameObjectType;
-
 #endif