diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-22 12:22:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-22 12:22:36 +0300 |
commit | b65a983d391edf4c2ee2fcf9c80f4ff074bc6b59 (patch) | |
tree | 13baa5499d54db3c92e1a6a709f8928f3920def2 /source/gameengine/Converter | |
parent | 756dace6f53ae2c11cb40a0f09b58d2de1ed8413 (diff) |
use BLI_findstring in more places & remove some warnings, no functional changes.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/KX_BlenderSceneConverter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 5852d618886..411ddc58c92 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -208,17 +208,14 @@ Scene *KX_BlenderSceneConverter::GetBlenderSceneForName(const STR_String& name) * Find the specified scene by name, or the first * scene if nothing matches (shouldn't happen). */ - - for (sce= (Scene*) m_maggie->scene.first; sce; sce= (Scene*) sce->id.next) - if (name == (sce->id.name+2)) - return sce; + if((sce= (Scene *)BLI_findstring(&m_maggie->scene, name.ReadPtr(), offsetof(ID, name) + 2))) + return sce; for (vector<Main*>::iterator it=m_DynamicMaggie.begin(); !(it==m_DynamicMaggie.end()); it++) { Main *main= *it; - for (sce= (Scene*) main->scene.first; sce; sce= (Scene*) sce->id.next) - if (name == (sce->id.name+2)) - return sce; + if((sce= (Scene *)BLI_findstring(&main->scene, name.ReadPtr(), offsetof(ID, name) + 2))) + return sce; } return (Scene*)m_maggie->scene.first; |