remove warnings for the BGE
authorCampbell Barton <ideasman42@gmail.com>
Wed, 25 Feb 2009 03:26:02 +0000 (03:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 25 Feb 2009 03:26:02 +0000 (03:26 +0000)
- variables that shadow vers declared earlier
- Py_Fatal print an error to the stderr
- gcc was complaining about the order of initialized vars (for classes)
- const return values for ints and bools didnt do anything.
- braces for ambiguous if  statements

32 files changed:
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_IpoConvert.cpp
source/gameengine/Expressions/InputParser.cpp
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_IActuator.cpp
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Shader.h
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
source/gameengine/Rasterizer/RAS_TexVert.h
source/gameengine/VideoTexture/FilterBase.cpp
source/gameengine/VideoTexture/FilterSource.h

index 67bec97ea32ebbfb9de8553c98db354a5fc1c7ad..d89d2d80ab4b796d24f68697391aece69dcb07f2 100644 (file)
@@ -563,10 +563,12 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
 
                // get some preferences
                SYS_SystemHandle syshandle = SYS_GetSystem();
+               /*
                bool properties = (SYS_GetCommandLineInt(syshandle, "show_properties", 0) != 0);
                bool usefixed = (SYS_GetCommandLineInt(syshandle, "fixedtime", 0) != 0);
                bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0);
                bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
+               */
                bool game2ipo = true;//(SYS_GetCommandLineInt(syshandle, "game2ipo", 0) != 0);
                bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0);
                bool usemat = false;
index 2fa3e192179538f5bba7db6bf6f292dab81804a4..3293d37af3a8b8bfb057095113cb9ef87412a3dd 100644 (file)
@@ -1997,18 +1997,18 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                MT_Vector3 x(ori.getColumn(0));
                                MT_Vector3 y(ori.getColumn(1));
                                MT_Vector3 z(ori.getColumn(2));
-                               MT_Vector3 scale(x.length(), y.length(), z.length());
-                               if (!MT_fuzzyZero(scale[0]))
-                                       x /= scale[0];
-                               if (!MT_fuzzyZero(scale[1]))
-                                       y /= scale[1];
-                               if (!MT_fuzzyZero(scale[2]))
-                                       z /= scale[2];
+                               MT_Vector3 parscale(x.length(), y.length(), z.length());
+                               if (!MT_fuzzyZero(parscale[0]))
+                                       x /= parscale[0];
+                               if (!MT_fuzzyZero(parscale[1]))
+                                       y /= parscale[1];
+                               if (!MT_fuzzyZero(parscale[2]))
+                                       z /= parscale[2];
                                ori.setColumn(0, x);                                                            
                                ori.setColumn(1, y);                                                            
                                ori.setColumn(2, z);                                                            
                                parentinversenode->SetLocalOrientation(ori);
-                               parentinversenode->SetLocalScale(scale);
+                               parentinversenode->SetLocalScale(parscale);
                                
                                parentinversenode->AddChild(gameobj->GetSGNode());
                        }
@@ -2194,18 +2194,18 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                                                MT_Vector3 x(ori.getColumn(0));
                                                                MT_Vector3 y(ori.getColumn(1));
                                                                MT_Vector3 z(ori.getColumn(2));
-                                                               MT_Vector3 scale(x.length(), y.length(), z.length());
-                                                               if (!MT_fuzzyZero(scale[0]))
-                                                                       x /= scale[0];
-                                                               if (!MT_fuzzyZero(scale[1]))
-                                                                       y /= scale[1];
-                                                               if (!MT_fuzzyZero(scale[2]))
-                                                                       z /= scale[2];
+                                                               MT_Vector3 localscale(x.length(), y.length(), z.length());
+                                                               if (!MT_fuzzyZero(localscale[0]))
+                                                                       x /= localscale[0];
+                                                               if (!MT_fuzzyZero(localscale[1]))
+                                                                       y /= localscale[1];
+                                                               if (!MT_fuzzyZero(localscale[2]))
+                                                                       z /= localscale[2];
                                                                ori.setColumn(0, x);                                                            
                                                                ori.setColumn(1, y);                                                            
                                                                ori.setColumn(2, z);                                                            
                                                                parentinversenode->SetLocalOrientation(ori);
-                                                               parentinversenode->SetLocalScale(scale);
+                                                               parentinversenode->SetLocalScale(localscale);
                                                                
                                                                parentinversenode->AddChild(gameobj->GetSGNode());
                                                        }
index ce004fa0504134b000f4d78ea325888e112a3292..f19390db8a974d6e1890afd169a0bfba86cdc533 100644 (file)
@@ -311,67 +311,67 @@ void BL_ConvertIpos(struct Object* blenderobject,KX_GameObject* gameobj,KX_Blend
                }
                
                {
-                       KX_ObColorIpoSGController* ipocontr=NULL;
+                       KX_ObColorIpoSGController* ipocontr_obcol=NULL;
 
                        ipo = ipoList->GetScalarInterpolator(OB_COL_R);
                        if (ipo)
                        {
-                               if (!ipocontr)
+                               if (!ipocontr_obcol)
                                {
-                                       ipocontr = new KX_ObColorIpoSGController();
-                                       gameobj->GetSGNode()->AddSGController(ipocontr);
-                                       ipocontr->SetObject(gameobj->GetSGNode());
+                                       ipocontr_obcol = new KX_ObColorIpoSGController();
+                                       gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
+                                       ipocontr_obcol->SetObject(gameobj->GetSGNode());
                                }
                                KX_IInterpolator *interpolator =
                                new KX_ScalarInterpolator(
-                                       &ipocontr->m_rgba[0],
+                                       &ipocontr_obcol->m_rgba[0],
                                        ipo);
-                               ipocontr->AddInterpolator(interpolator);
+                               ipocontr_obcol->AddInterpolator(interpolator);
                        }
                        ipo = ipoList->GetScalarInterpolator(OB_COL_G);
                        if (ipo)
                        {
-                               if (!ipocontr)
+                               if (!ipocontr_obcol)
                                {
-                                       ipocontr = new KX_ObColorIpoSGController();
-                                       gameobj->GetSGNode()->AddSGController(ipocontr);
-                                       ipocontr->SetObject(gameobj->GetSGNode());
+                                       ipocontr_obcol = new KX_ObColorIpoSGController();
+                                       gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
+                                       ipocontr_obcol->SetObject(gameobj->GetSGNode());
                                }
                                KX_IInterpolator *interpolator =
                                new KX_ScalarInterpolator(
-                                       &ipocontr->m_rgba[1],
+                                       &ipocontr_obcol->m_rgba[1],
                                        ipo);
-                               ipocontr->AddInterpolator(interpolator);
+                               ipocontr_obcol->AddInterpolator(interpolator);
                        }
                        ipo = ipoList->GetScalarInterpolator(OB_COL_B);
                        if (ipo)
                        {
-                               if (!ipocontr)
+                               if (!ipocontr_obcol)
                                {
-                                       ipocontr = new KX_ObColorIpoSGController();
-                                       gameobj->GetSGNode()->AddSGController(ipocontr);
-                                       ipocontr->SetObject(gameobj->GetSGNode());
+                                       ipocontr_obcol = new KX_ObColorIpoSGController();
+                                       gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
+                                       ipocontr_obcol->SetObject(gameobj->GetSGNode());
                                }
                                KX_IInterpolator *interpolator =
                                new KX_ScalarInterpolator(
-                                       &ipocontr->m_rgba[2],
+                                       &ipocontr_obcol->m_rgba[2],
                                        ipo);
-                               ipocontr->AddInterpolator(interpolator);
+                               ipocontr_obcol->AddInterpolator(interpolator);
                        }
                        ipo = ipoList->GetScalarInterpolator(OB_COL_A);
                        if (ipo)
                        {
-                               if (!ipocontr)
+                               if (!ipocontr_obcol)
                                {
-                                       ipocontr = new KX_ObColorIpoSGController();
-                                       gameobj->GetSGNode()->AddSGController(ipocontr);
-                                       ipocontr->SetObject(gameobj->GetSGNode());
+                                       ipocontr_obcol = new KX_ObColorIpoSGController();
+                                       gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
+                                       ipocontr_obcol->SetObject(gameobj->GetSGNode());
                                }
                                KX_IInterpolator *interpolator =
                                new KX_ScalarInterpolator(
-                                       &ipocontr->m_rgba[3],
+                                       &ipocontr_obcol->m_rgba[3],
                                        ipo);
-                               ipocontr->AddInterpolator(interpolator);
+                               ipocontr_obcol->AddInterpolator(interpolator);
                        }
                }
 
index a60e1ee59dc8eec2446c747b8a86a097525b1cf7..e016fb8d007155bc2489390e7e50d730d795f8e6 100644 (file)
@@ -274,7 +274,7 @@ void CParser::NextSym()
                        } else if (((ch >= 'a') && (ch <= 'z'))
                                || ((ch >= 'A') && (ch <= 'Z')))
                        { // reserved word?
-                               int start;
+                               
                                start = chcount;
                                CharRep();
                                GrabString(start);
index 2c4fbd5a867e2cd6f0403404ca325caeafa51439..e04b42ee9ccf5b507deb6ac49e87e01665ecfbd8 100644 (file)
@@ -147,7 +147,7 @@ PyObject *PyObjectPlus::_getattr_self(const PyAttributeDef attrlist[], void *sel
                        if (attrdef->m_length > 1)
                        {
                                PyObject* resultlist = PyList_New(attrdef->m_length);
-                               for (int i=0; i<attrdef->m_length; i++)
+                               for (unsigned int i=0; i<attrdef->m_length; i++)
                                {
                                        switch (attrdef->m_type) {
                                        case KX_PYATTRIBUTE_TYPE_BOOL:
index 0fae175e3cf07741d7d893065ac3eaf7f47af3f4..37eae3a8c6184f68dc974c49f789da4313640d76 100644 (file)
@@ -73,7 +73,7 @@ typedef int Py_ssize_t;
 #endif
 
 static inline void Py_Fatal(const char *M) {
-       //cout << M << endl; 
+       fprintf(stderr, "%s\n", M);
        exit(-1);
 };
 
index e8e29fb27696e99ec8771187bff80f0a87052f1f..c21e5db1410bcb1e83a573173b4922da4e504b32 100644 (file)
@@ -42,14 +42,14 @@ SCA_Joystick::SCA_Joystick(short int index)
        m_axis21(0),
        m_prec(3200),
        m_buttonnum(-2),
+       m_axismax(-1),
        m_hatdir(-2),
+       m_buttonmax(-1),
+       m_hatmax(-1),
        m_isinit(0),
        m_istrig_axis(0),
        m_istrig_button(0),
-       m_istrig_hat(0),
-       m_axismax(-1),
-       m_buttonmax(-1),
-       m_hatmax(-1)
+       m_istrig_hat(0)
 {
 #ifndef DISABLE_SDL
        m_private = new PrivateData();
index 25c9888cadd6c408cf640fe2547adaa746152b1c..31a620b939d4b10ae7c09b9420d6222814c73404 100644 (file)
@@ -53,10 +53,10 @@ SCA_DelaySensor::SCA_DelaySensor(class SCA_EventManager* eventmgr,
                                                                 int duration,
                                                                 bool repeat,
                                                                 PyTypeObject* T)
-       : SCA_ISensor(gameobj,eventmgr, T), 
+       : SCA_ISensor(gameobj,eventmgr, T),
+       m_repeat(repeat),
        m_delay(delay),
-       m_duration(duration),
-       m_repeat(repeat)
+       m_duration(duration)
 {
        Init();
 }
index eeca2d7b44c64d7272709d2df4e868fb60f93ee0..309f3108418e2743e8fe92d8467a1b5377b0ebbf 100644 (file)
@@ -36,8 +36,8 @@ using namespace std;
 
 SCA_IActuator::SCA_IActuator(SCA_IObject* gameobj,
                                                         PyTypeObject* T) :
-       m_links(0),
-       SCA_ILogicBrick(gameobj,T) 
+       SCA_ILogicBrick(gameobj,T),
+       m_links(0)
 {
        // nothing to do
 }
index 7ffb21b5490f86116bb2d27d7334898fe30b9323..51bd6454d927002bd66c6db9b58b989032854b5d 100644 (file)
@@ -36,9 +36,9 @@ class SCA_IActuator : public SCA_ILogicBrick
 {
        friend class SCA_LogicManager;
 protected:
-       std::vector<CValue*> m_events;
        int                                      m_links;       // number of active links to controllers
                                                                        // when 0, the actuator is automatically stopped
+       std::vector<CValue*> m_events;
        void RemoveAllEvents();
 
 public:
index 0bd20117f316e0342ade13115d7687a6a4595b1c..f9c192cae5cd432a38712943d9fc13f0d731cd01 100644 (file)
@@ -38,8 +38,8 @@
 SCA_IController::SCA_IController(SCA_IObject* gameobj,
                                                                 PyTypeObject* T)
        :
-       m_statemask(0),
-       SCA_ILogicBrick(gameobj,T)
+       SCA_ILogicBrick(gameobj,T),
+       m_statemask(0)
 {
 }
        
index 3afc48b719c33b4be2a7fcb6a9d6d1e6ce6ccd27..e5ca26eac856861a40abd4fbbebceb28b942566d 100644 (file)
@@ -40,7 +40,7 @@
 
 MT_Point3 SCA_IObject::m_sDummy=MT_Point3(0,0,0);
 
-SCA_IObject::SCA_IObject(PyTypeObject* T): m_initState(0), m_state(0), CValue(T)
+SCA_IObject::SCA_IObject(PyTypeObject* T): CValue(T), m_initState(0), m_state(0)
 {
        m_suspended = false;
 }
index 4f4d62f13b940e4d584cf171ff1d40c5d265e8ec..36e4a5f2c306f17ccece1bf49633016df412ea21 100644 (file)
@@ -158,8 +158,8 @@ bool SCA_MouseSensor::Evaluate(CValue* event)
        case KX_MOUSESENSORMODE_WHEELUP:
        case KX_MOUSESENSORMODE_WHEELDOWN:
                {
-                       const SCA_InputEvent& event = mousedev->GetEventValue(m_hotkey);
-                       switch (event.m_status){        
+                       const SCA_InputEvent& mevent = mousedev->GetEventValue(m_hotkey);
+                       switch (mevent.m_status){       
                        case SCA_InputEvent::KX_JUSTACTIVATED:
                                m_val = 1;
                                result = true;
index 2a4a74d5b90e8d43aed7b72ee915148bcac5ffaf..e8281201d2482fe1dc17113894c4ddc0d480131e 100644 (file)
@@ -18,7 +18,7 @@
 #define spit(x) std::cout << x << std::endl;
 
 #define SORT_UNIFORMS 1
-#define UNIFORM_MAX_LEN sizeof(float)*16
+#define UNIFORM_MAX_LEN (int)sizeof(float)*16
 #define MAX_LOG_LEN 262144 // bounds
 
 BL_Uniform::BL_Uniform(int data_size)
@@ -108,7 +108,7 @@ void BL_Uniform::SetData(int location, int type,bool transpose)
 #endif
 }
 
-const bool BL_Shader::Ok()const
+bool BL_Shader::Ok()const
 {
        return (mShader !=0 && mOk && mUse);
 }
index 52cbd0cda514f0f8b2949dbd11d552ab8b676e07..76acd5513ef582dec242df1bf1249cc20ecd0baa 100644 (file)
@@ -166,7 +166,7 @@ public:
        //const BL_Sampler*     GetSampler(int i);
        void                            SetSampler(int loc, int unit);
 
-       const bool                      Ok()const;
+       bool                            Ok()const;
        unsigned int            GetProg();
        void                            SetProg(bool enable);
        int                                     GetAttribute(){return mAttr;};
index 534c48661b7c25f9626c0a5700cf880b02a999c4..062e9f7df503ac14a7e8da81dd9db1d3262f9469 100644 (file)
@@ -384,10 +384,10 @@ SG_Controller*    KX_BulletPhysicsController::GetReplica(class SG_Node* destnode)
                        childit!= destnode->GetSGChildren().end();
                        ++childit
                                ) {
-                               KX_GameObject *clientgameobj = static_cast<KX_GameObject*>( (*childit)->GetSGClientObject());
-                               if (clientgameobj)
+                               KX_GameObject *clientgameobj_child = static_cast<KX_GameObject*>( (*childit)->GetSGClientObject());
+                               if (clientgameobj_child)
                                {
-                                       parentKxCtrl = (KX_BulletPhysicsController*)clientgameobj->GetPhysicsController();
+                                       parentKxCtrl = (KX_BulletPhysicsController*)clientgameobj_child->GetPhysicsController();
                                        parentctrl = parentKxCtrl;
                                        ccdParent = parentKxCtrl;
                                }
index c0d802a9cf9760f7c9a0e299a5f8992c2d609600..8a7ff41dfa6c68ee49a57e53ca6b4577ae4cffec 100644 (file)
@@ -56,9 +56,9 @@ KX_ConstraintActuator::KX_ConstraintActuator(SCA_IObject *gameobj,
                                                                                         int option,
                                                                                         char *property,
                                                                                         PyTypeObject* T) : 
+       SCA_IActuator(gameobj, T),
        m_refDirection(refDir),
-       m_currentTime(0),
-       SCA_IActuator(gameobj, T)
+       m_currentTime(0)
 {
        m_posDampTime = posDampTime;
        m_rotDampTime = rotDampTime;
index 2387dcdef3acb8dcee7e4e8617f0f7bbb494bf25..3090c668f03e4f6f059160dac5b3bc11f467aed6 100644 (file)
@@ -132,7 +132,7 @@ bool KX_GameActuator::Update()
                        {
                                char mashal_path[512];
                                char *marshal_buffer = NULL;
-                               int marshal_length;
+                               unsigned int marshal_length;
                                FILE *fp = NULL;
                                
                                pathGamePythonConfig(mashal_path);
index 37f16b92a2614b3175d241aad8f2154dc23aa2c8..60512991cf4df5047e34186700d1cfe11e68716a 100644 (file)
@@ -1462,11 +1462,9 @@ PyObject* KX_GameObject::PySetState(PyObject* self, PyObject* value)
 PyObject* KX_GameObject::PyGetVelocity(PyObject* self, PyObject* args)
 {
        // only can get the velocity if we have a physics object connected to us...
-       MT_Vector3 velocity(0.0,0.0,0.0);
        MT_Point3 point(0.0,0.0,0.0);
-       
-       
        PyObject* pypos = NULL;
+       
        if (PyArg_ParseTuple(args, "|O:getVelocity", &pypos))
        {
                if (pypos)
@@ -1478,10 +1476,11 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* self, PyObject* args)
        
        if (m_pPhysicsController1)
        {
-               velocity = m_pPhysicsController1->GetVelocity(point);
+               return PyObjectFrom(m_pPhysicsController1->GetVelocity(point));
+       }
+       else {
+               return PyObjectFrom(MT_Vector3(0.0,0.0,0.0));
        }
-       
-       return PyObjectFrom(velocity);
 }
 
 
@@ -2045,8 +2044,8 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast,
                                if (callback.m_hitMesh)
                                {
                                        // if this field is set, then we can trust that m_hitPolygon is a valid polygon
-                                       RAS_Polygon* poly = callback.m_hitMesh->GetPolygon(callback.m_hitPolygon);
-                                       KX_PolyProxy* polyproxy = new KX_PolyProxy(callback.m_hitMesh, poly);
+                                       RAS_Polygon* polygon = callback.m_hitMesh->GetPolygon(callback.m_hitPolygon);
+                                       KX_PolyProxy* polyproxy = new KX_PolyProxy(callback.m_hitMesh, polygon);
                                        PyTuple_SET_ITEM(returnValue, 3, polyproxy);
                                }
                                else
index 67d54cf0b0b1f341a48aff1120563d16ea42f0d3..55a7e2ade60c5019f84da38e797d227fd72129ec 100644 (file)
@@ -58,8 +58,8 @@ KX_IpoSGController::KX_IpoSGController()
   m_ipo_add(false),
   m_ipo_local(false),
   m_modified(true),
-  m_ipo_start_initialized(false),
   m_ipotime(1.0),
+  m_ipo_start_initialized(false),
   m_ipo_start_euler(0.0,0.0,0.0),
   m_ipo_euler_initialized(false)
 {
index 1271474802c2f020460600418a5c28087d94a1a6..074b31951217f97c47de2d4cce52ca572652f1df 100644 (file)
@@ -713,7 +713,7 @@ void KX_KetsjiEngine::Render()
                if (!BeginFrame())
                        return;
 
-               KX_SceneList::iterator sceneit;
+
                for (sceneit = m_scenes.begin();sceneit != m_scenes.end(); sceneit++)
                // for each scene, call the proceed functions
                {
index 7ef544618f800aee75d7af6560a9a4f503481580..fb38f16c1699b00a2448cb28e338ec4745d5bb1b 100644 (file)
@@ -240,7 +240,7 @@ bool        KX_NearSensor::BroadPhaseFilterCollision(void*obj1,void*obj2)
 bool   KX_NearSensor::NewHandleCollision(void* obj1,void* obj2,const PHY_CollData * coll_data)
 {
 //     KX_TouchEventManager* toucheventmgr = static_cast<KX_TouchEventManager*>(m_eventmgr);
-       KX_GameObject* parent = static_cast<KX_GameObject*>(GetParent());
+//     KX_GameObject* parent = static_cast<KX_GameObject*>(GetParent());
        
        // need the mapping from PHY_IPhysicsController to gameobjects now
        
index 9a6209985381680070cf2b1ffe2441dd76976b9c..b647c72fc10707f1e1da4ce4b9b371685928465c 100644 (file)
@@ -65,12 +65,12 @@ KX_ObjectActuator(
        m_current_linear_factor(0.0),
        m_current_angular_factor(0.0),
        m_damping(damping),
+       m_previous_error(0.0,0.0,0.0),
+       m_error_accumulator(0.0,0.0,0.0),
        m_bitLocalFlag (flag),
        m_active_combined_velocity (false),
        m_linear_damping_active(false),
-       m_angular_damping_active(false),
-       m_error_accumulator(0.0,0.0,0.0),
-       m_previous_error(0.0,0.0,0.0)
+       m_angular_damping_active(false)
 {
        if (m_bitLocalFlag.ServoControl)
        {
index 1c9e2a49c11770c85202f7bba00620a4ef0579d4..ff962d57c9d9c2680702b09407b5d367e4a9d2bd 100644 (file)
@@ -146,8 +146,8 @@ PyObject* KX_PolyProxy::_getattr(const char *attr)
 }
 
 KX_PolyProxy::KX_PolyProxy(const RAS_MeshObject*mesh, RAS_Polygon* polygon)
-:      m_mesh((RAS_MeshObject*)mesh),
-       m_polygon(polygon)
+:      m_polygon(polygon),
+       m_mesh((RAS_MeshObject*)mesh)
 {
 }
 
index c3ae3d0ec52ae7f16a5162ac4e5288404ad5476d..b3e8d15189f961bee4a4ac839f1c8dc71cc95631 100644 (file)
@@ -196,7 +196,7 @@ static PyObject* gPyGetSpectrum(PyObject*)
 }
 
 
-
+#if 0 // unused
 static PyObject* gPyStartDSP(PyObject*, PyObject* args)
 {
        SND_IAudioDevice* audiodevice = SND_DeviceManager::Instance();
@@ -213,7 +213,7 @@ static PyObject* gPyStartDSP(PyObject*, PyObject* args)
        
        Py_RETURN_NONE;
 }
-
+#endif
 
 
 static PyObject* gPyStopDSP(PyObject*, PyObject* args)
@@ -257,7 +257,7 @@ static PyObject* gPySetPhysicsTicRate(PyObject*, PyObject* args)
        PHY_GetActiveEnvironment()->setFixedTimeStep(true,ticrate);
        Py_RETURN_NONE;
 }
-
+#if 0 // unused
 static PyObject* gPySetPhysicsDebug(PyObject*, PyObject* args)
 {
        int debugMode;
@@ -267,7 +267,7 @@ static PyObject* gPySetPhysicsDebug(PyObject*, PyObject* args)
        PHY_GetActiveEnvironment()->setDebugMode(debugMode);
        Py_RETURN_NONE;
 }
-
+#endif
 
 
 static PyObject* gPyGetPhysicsTicRate(PyObject*)
index 3760451848688ddadeb1b44caf498bc081f85ceb..562c096d440b3b5a5a45f45252a5291ba8580b1c 100644 (file)
@@ -444,7 +444,7 @@ PyObject* KX_SoundActuator::PySetLooping(PyObject* self, PyObject* args, PyObjec
 
 PyObject* KX_SoundActuator::PyGetLooping(PyObject* self, PyObject* args, PyObject* kwds)
 {
-       int looping = (m_soundObject) ? m_soundObject->GetLoopMode() : SND_LOOP_OFF;
+       int looping = (m_soundObject) ? m_soundObject->GetLoopMode() : (int)SND_LOOP_OFF;
        PyObject* result = PyInt_FromLong(looping);
        
        return result;
index d2274c1e8d66fa057ec0d321a2bd7b4c8a9e6185..eb01385bc0196cc11aca4052a3cff361a4a6321f 100644 (file)
@@ -317,8 +317,8 @@ static void DrawAabb(btIDebugDraw* debugDrawer,const btVector3& from,const btVec
 
 
 CcdPhysicsEnvironment::CcdPhysicsEnvironment(btDispatcher* dispatcher,btOverlappingPairCache* pairCache)
-:m_scalingPropagated(false),
-m_numIterations(10),
+:m_numIterations(10),
+m_scalingPropagated(false),
 m_numTimeSubSteps(1),
 m_ccdMode(0),
 m_solverType(-1),
@@ -326,8 +326,8 @@ m_profileTimings(0),
 m_enableSatCollisionDetection(false),
 m_solver(NULL),
 m_ownPairCache(NULL),
-m_ownDispatcher(NULL),
-m_filterCallback(NULL)
+m_filterCallback(NULL),
+m_ownDispatcher(NULL)
 {
 
        for (int i=0;i<PHY_NUM_RESPONSE;i++)
index fb3607f89f48476aa94ee93a259de2c26f4c31b6..cd88112007be5caa3ae14b89c303024cac0de63f 100644 (file)
@@ -143,7 +143,7 @@ const STR_String& RAS_IPolyMaterial::GetTextureName() const
        return m_texturename;
 }
 
-const unsigned int     RAS_IPolyMaterial::GetFlag() const
+unsigned int   RAS_IPolyMaterial::GetFlag() const
 {
        return m_flag;
 }
index 218dd91cb30dcfbf84fe29129cb1f1475cb5c396..e5b24070c4b10c89dae7348740681928b2d1f294 100644 (file)
@@ -138,7 +138,7 @@ public:
        const STR_String&       GetMaterialName() const;
        dword                           GetMaterialNameHash() const;
        const STR_String&       GetTextureName() const;
-       const unsigned int      GetFlag() const;
+       unsigned int            GetFlag() const;
 
        virtual bool            UsesLighting(RAS_IRasterizer *rasty) const;
        virtual bool            UsesObjectColor() const;
index 54da109cbf194b1cd6791c49ae664890a36a0fa2..157a6ce3d51b73ff74b9ae590ecf5cb4b022e5a3 100644 (file)
@@ -110,7 +110,7 @@ public:
                return (unsigned char *) &m_rgba;
        }
 
-       const unsigned int getOrigIndex() const {
+       unsigned int getOrigIndex() const {
                return m_origindex;
        }
 
index b0112cd355b683ea7759d34eb18faa2aa7814e86..b2abd4354fd403fe1680352b0c8334014a7c58fe 100644 (file)
@@ -69,7 +69,7 @@ FilterBase * FilterBase::findFirst (void)
 {
        // find first filter in chain
        FilterBase * frst;
-       for (frst = this; frst->m_previous != NULL; frst = frst->m_previous->m_filter);
+       for (frst = this; frst->m_previous != NULL; frst = frst->m_previous->m_filter) {};
        // set first filter
        return frst;
 }
index 7e90747d2522f5ae6fdeb93b29291eeb5ab86704..6385ed5108f7414658969d0457ebe9b6363b94df 100644 (file)
@@ -189,9 +189,10 @@ protected:
                int d = m_buffU[offset] - 128;
                int e = m_buffV[offset] - 128;
                // if horizontal interpolation is needed
-               if ((x & 1) == 1)
+               if ((x & 1) == 1) {
                        // if vertical interpolation is needed too
                        if ((y & 1) == 1)
+                       {
                                // if this pixel is on the edge
                                if (isEdge(x, y, size))
                                {
@@ -206,7 +207,8 @@ protected:
                                        e = interpolVH(m_buffV + offset) - 128;
                                }
                                // otherwise use horizontal interpolation only
-                       else
+                       }
+                       else {
                                // if this pixel is on the edge
                                if (isEdge(x, y, size))
                                {
@@ -221,6 +223,8 @@ protected:
                                        e = interpolH(m_buffV + offset) - 128;
                                }
                                // otherwise if only vertical interpolation is needed
+                       }
+               }
                else if ((y & 1) == 1)
                        // if this pixel is on the edge
                        if (isEdge(x, y, size))