code cleanup: dont set the namespace in STR_String.h - 'using namespace std', since...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 23 Feb 2012 02:36:30 +0000 (02:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 23 Feb 2012 02:36:30 +0000 (02:36 +0000)
intern/ghost/intern/GHOST_WindowManager.cpp
intern/string/STR_String.h
intern/string/intern/STR_String.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/Expressions/Value.h
source/gameengine/Network/LoopBackNetwork/NG_LoopBackNetworkDeviceInterface.h
source/gameengine/Network/NG_NetworkScene.h
source/gameengine/Rasterizer/RAS_ICanvas.h

index a4b65c78ef9ea19e1b41f56e3cf2d96b38b51f19..cf236283b0f4e25905c907a18bd357561e4d0e47 100644 (file)
@@ -79,7 +79,7 @@ GHOST_TSuccess GHOST_WindowManager::removeWindow(const GHOST_IWindow* window)
                        endFullScreen();
                }
                else {
-                       vector<GHOST_IWindow*>::iterator result = find(m_windows.begin(), m_windows.end(), window);
+                       std::vector<GHOST_IWindow*>::iterator result = find(m_windows.begin(), m_windows.end(), window);
                        if (result != m_windows.end()) {
                                setWindowInactive(window);
                                m_windows.erase(result);
@@ -99,7 +99,7 @@ bool GHOST_WindowManager::getWindowFound(const GHOST_IWindow* window) const
             found = true;
         }
         else {
-            vector<GHOST_IWindow*>::const_iterator result = find(m_windows.begin(), m_windows.end(), window);
+            std::vector<GHOST_IWindow*>::const_iterator result = find(m_windows.begin(), m_windows.end(), window);
             if (result != m_windows.end()) {
                 found = true;
             }
index cbf9d0c1b3b244189635b92877671c90d8ce3387..2f17b059c8ff2e609926854feb2996be432a7171 100644 (file)
@@ -51,8 +51,6 @@
 #include <cstring>
 #include <cstdlib>
 
-using namespace std;
-
 #ifdef WITH_CXX_GUARDEDALLOC
 #include "MEM_guardedalloc.h"
 #endif
@@ -95,8 +93,10 @@ public:
        inline void                     Clear()                                                                         { Len = pData[0] = 0; }
        inline const STR_String & Reverse()
        {
-               for (int i1=0, i2=Len-1; i1<i2; i1++, i2--)
-                       swap(pData[i1], pData[i2]); return *this;
+               for (int i1 = 0, i2 = Len - 1; i1 < i2; i1++, i2--) {
+                       std::swap(pData[i1], pData[i2]);
+               }
+               return *this;
        }
 
        // Properties
@@ -133,7 +133,7 @@ public:
        int                             FindOneOf(const char *set, int pos = 0) const;
        int                             RFindOneOf(const char *set, int pos = 0) const;
 
-       vector<STR_String>      Explode(char c) const;
+       std::vector<STR_String> Explode(char c) const;
 
        // Formatting
        STR_String&                     Upper();
index e711c4e32602661e20555d3ec5e23a5e4fe33b59..5ad41c696e30f41930f190c7b53270c26c187427 100644 (file)
@@ -699,23 +699,19 @@ rcSTR_String STR_String::Concat(const char *data, int len)
 }
 
 
-
-
-
-vector<STR_String>     STR_String::Explode(char c) const
+std::vector<STR_String>        STR_String::Explode(char c) const
 {
-       STR_String                              lcv     = *this;
-       vector<STR_String>              uc;
+       STR_String              lcv = *this;
+       std::vector<STR_String> uc;
 
        while (lcv.Length())
        {
                int pos = lcv.Find(c);
-               if (pos < 0)
-               {
+               if (pos < 0) {
                        uc.push_back(lcv);
                        lcv.Clear();
-               } else
-               {
+               }
+               else {
                        uc.push_back(lcv.Left(pos));
                        lcv = lcv.Mid(pos+1);
                }
index f9b0d587b81276cf2b2812c8b018bd5d73d7ec15..9c2143d2cabbae14b625dbf18ab642046e85e2f4 100644 (file)
@@ -39,6 +39,8 @@
 #include "KX_ISceneConverter.h"
 #include "KX_IpoConvert.h"
 
+using namespace std;
+
 class KX_WorldInfo;
 class SCA_IActuator;
 class SCA_IController;
index 10d8a8abd8fee4a0afbe15c0ef763e0588dbdd8d..917cf4091982859510c6e0d3accf847f6d773d4c 100644 (file)
@@ -26,6 +26,8 @@
 #include <map>         // array functionality for the propertylist
 #include "STR_String.h"        // STR_String class
 
+using namespace std;
+
 #ifdef WITH_CXX_GUARDEDALLOC
 #include "MEM_guardedalloc.h"
 #endif
index b03fc8e8e403ff1c55c786982870780fa3f99e61..729db794dcf8c419939b6ad50860739fc34ee69f 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef NG_LOOPBACKNETWORKDEVICEINTERFACE_H
 #define NG_LOOPBACKNETWORKDEVICEINTERFACE_H
 
+using namespace std;
+
 #include <deque>
 #include "NG_NetworkDeviceInterface.h"
 
index 01a0d184b1c0dbe08348ed2b00d58f505b5f3efb..c0469f21850a5ddcb994cc2557512179867160cf 100644 (file)
@@ -45,6 +45,8 @@
        #undef SendMessage
 #endif
 
+using namespace std;
+
 class NG_NetworkDeviceInterface;
 
 class NG_NetworkScene
index 2c2f62c946eb1914efd6b0675416795efca002af..3ca1c992162e95fa686de8f01c0d3b84ae85aac3 100644 (file)
@@ -36,6 +36,8 @@
 #include "MEM_guardedalloc.h"
 #endif
 
+using namespace std;
+
 class RAS_Rect;
 
 /**