From: <gr...@us...> - 2004-06-30 19:23:40
|
Update of /cvsroot/crystal/CS/plugins/bugplug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1035/plugins/bugplug Modified Files: bugplug.cpp Log Message: Luca fixed an internal compiler error which MSVC6 users would get in the bugplug plugin. He replaced the recent fix he already did with a more clean solution to the problem, avoiding the use of ugly an #idef directive. Index: bugplug.cpp =================================================================== RCS file: /cvsroot/crystal/CS/plugins/bugplug/bugplug.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- bugplug.cpp 28 Jun 2004 20:47:55 -0000 1.127 +++ bugplug.cpp 30 Jun 2004 19:23:31 -0000 1.128 @@ -368,31 +368,6 @@ sector->SetVisibilityCullerPlugin (culler); } -void csBugPlug::AddSelectedMesh (iMeshWrapper* m) -{ - int i; - for (i = 0 ; i < selected_meshes.Length () ; i++) - { -#if defined(COMP_VC) && (_MSC_VER < 1300) - if (((iMeshWrapper*)selected_meshes[i]) == m) -#else - if (selected_meshes[i] == m) -#endif - return; - } - selected_meshes.Push (m); -} - -void csBugPlug::RemoveSelectedMesh (iMeshWrapper* m) -{ - int i; - for (i = 0 ; i < selected_meshes.Length () ; i++) - if (selected_meshes[i] == m) - { - selected_meshes.DeleteIndex (i); - return; - } -} void csBugPlug::SelectMesh (iSector* sector, const char* meshname) { @@ -430,6 +405,38 @@ } } +void csBugPlug::AddSelectedMesh (iMeshWrapper* m) +{ + int i; + int count = selected_meshes.Length (); + for (i = 0 ; i < count ; i++) + { + // Assign selected_mesh[i] to temporary variable to avoid an + // internal MSVC6 error. Luca + iMeshWrapper* mesh = selected_meshes[i]; + if (mesh == m) + return; + } + selected_meshes.Push (m); +} + +void csBugPlug::RemoveSelectedMesh (iMeshWrapper* m) +{ + int i; + int count = selected_meshes.Length (); + for (i = 0 ; i < count ; i++) + { + // Assign selected_mesh[i] to temporary variable to avoid an + // internal MSVC6 error. Luca + iMeshWrapper* mesh = selected_meshes[i]; + if (mesh == m) + { + selected_meshes.DeleteIndex (i); + return; + } + } +} + void csBugPlug::VisculCmd (const char* cmd) { if (!visculler) |