Browse Source

Add missing `return` statements

Johan Mattsson 2 years ago
parent
commit
8cd56a25a1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      engine/source/2d/sceneobject/Path.h

+ 4 - 1
engine/source/2d/sceneobject/Path.h

@@ -77,6 +77,7 @@ public:
    {
    {
       if (mNodes.empty()) return false;
       if (mNodes.empty()) return false;
       if((index >= 0) && (index < mNodes.size())) return true;
       if((index >= 0) && (index < mNodes.size())) return true;
+      return false;
    }
    }
 
 
    void attachObject(SceneObject* object, F32 speed, F32 force, bool orientToPath, F32 angleOff, bool snapToNode, S32 startNode, bool loop, S32 maxLoop);
    void attachObject(SceneObject* object, F32 speed, F32 force, bool orientToPath, F32 angleOff, bool snapToNode, S32 startNode, bool loop, S32 maxLoop);
@@ -95,6 +96,8 @@ public:
       Vector<PathObject*>::iterator i;
       Vector<PathObject*>::iterator i;
       for (i = mObjs.begin(); i != mObjs.end(); i++)
       for (i = mObjs.begin(); i != mObjs.end(); i++)
          if ((*i)->mObj == obj) return *i;
          if ((*i)->mObj == obj) return *i;
+      
+      return NULL;
    }
    }
 
 
    DECLARE_CONOBJECT(Path);
    DECLARE_CONOBJECT(Path);
@@ -110,4 +113,4 @@ private:
 
 
 };
 };
 
 
-#endif
+#endif