Explorar el Código

Removed string vector

Marko Pintera hace 13 años
padre
commit
5043bedc15

+ 0 - 1
CamelotRenderer/CamelotRenderer.cpp

@@ -18,7 +18,6 @@
 #include "OgreSharedPtr.h"
 #include "OgreSharedPtr.h"
 #include "OgreString.h"
 #include "OgreString.h"
 #include "OgreStringConverter.h"
 #include "OgreStringConverter.h"
-#include "OgreStringVector.h"
 #include "OgreThreadDefines.h"
 #include "OgreThreadDefines.h"
 #include "OgreVector2.h"
 #include "OgreVector2.h"
 #include "OgreVector3.h"
 #include "OgreVector3.h"

+ 0 - 1
CamelotRenderer/CamelotRenderer.vcxproj

@@ -169,7 +169,6 @@
     <ClInclude Include="OgreString.h" />
     <ClInclude Include="OgreString.h" />
     <ClInclude Include="OgreStringConverter.h" />
     <ClInclude Include="OgreStringConverter.h" />
     <ClInclude Include="OgreStringInterface.h" />
     <ClInclude Include="OgreStringInterface.h" />
-    <ClInclude Include="OgreStringVector.h" />
     <ClInclude Include="OgreTexture.h" />
     <ClInclude Include="OgreTexture.h" />
     <ClInclude Include="OgreTextureManager.h" />
     <ClInclude Include="OgreTextureManager.h" />
     <ClInclude Include="OgreTextureUnitState.h" />
     <ClInclude Include="OgreTextureUnitState.h" />

+ 3 - 6
CamelotRenderer/CamelotRenderer.vcxproj.filters

@@ -184,9 +184,6 @@
     <ClInclude Include="OgreStringConverter.h">
     <ClInclude Include="OgreStringConverter.h">
       <Filter>Header Files\ForRemoval</Filter>
       <Filter>Header Files\ForRemoval</Filter>
     </ClInclude>
     </ClInclude>
-    <ClInclude Include="OgreStringVector.h">
-      <Filter>Header Files\ForRemoval</Filter>
-    </ClInclude>
     <ClInclude Include="OgreThreadDefines.h">
     <ClInclude Include="OgreThreadDefines.h">
       <Filter>Header Files\ForRemoval</Filter>
       <Filter>Header Files\ForRemoval</Filter>
     </ClInclude>
     </ClInclude>
@@ -328,9 +325,6 @@
     <ClInclude Include="CmApplication.h">
     <ClInclude Include="CmApplication.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
-    <ClInclude Include="OgreConfigOptionMap.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="CmRenderSystemManager.h">
     <ClInclude Include="CmRenderSystemManager.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
@@ -517,6 +511,9 @@
     <ClInclude Include="OgreTextureManager.h">
     <ClInclude Include="OgreTextureManager.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="OgreConfigOptionMap.h">
+      <Filter>Header Files\ForRemoval</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClCompile Include="stdafx.cpp">
     <ClCompile Include="stdafx.cpp">

+ 1 - 2
CamelotRenderer/OgreConfigOptionMap.h

@@ -31,7 +31,6 @@ THE SOFTWARE.
 
 
 #include "OgrePrerequisites.h"
 #include "OgrePrerequisites.h"
 
 
-#include "OgreStringVector.h"
 #include "OgreString.h"
 #include "OgreString.h"
 
 
 
 
@@ -51,7 +50,7 @@ namespace Ogre {
     {
     {
         String name;
         String name;
         String currentValue;
         String currentValue;
-        StringVector possibleValues;
+        std::vector<Ogre::String> possibleValues;
         bool immutable;
         bool immutable;
     } ConfigOption;
     } ConfigOption;
 
 

+ 3 - 3
CamelotRenderer/OgreD3D9RenderSystem.cpp

@@ -307,7 +307,7 @@ namespace Ogre
 				}
 				}
 
 
 				// Reset video mode to default if previous doesn't avail in new possible values
 				// Reset video mode to default if previous doesn't avail in new possible values
-				StringVector::const_iterator itValue =
+				std::vector<Ogre::String>::const_iterator itValue =
 					std::find(optVideoMode->possibleValues.begin(),
 					std::find(optVideoMode->possibleValues.begin(),
 					optVideoMode->possibleValues.end(),
 					optVideoMode->possibleValues.end(),
 					optVideoMode->currentValue);
 					optVideoMode->currentValue);
@@ -357,7 +357,7 @@ namespace Ogre
 
 
 		if( name == "FSAA" )
 		if( name == "FSAA" )
 		{
 		{
-			StringVector values = StringUtil::split(value, " ", 1);
+			std::vector<Ogre::String> values = StringUtil::split(value, " ", 1);
 			mFSAASamples = StringConverter::parseUnsignedInt(values[0]);
 			mFSAASamples = StringConverter::parseUnsignedInt(values[0]);
 			if (values.size() > 1)
 			if (values.size() > 1)
 				mFSAAHint = values[1];
 				mFSAAHint = values[1];
@@ -438,7 +438,7 @@ namespace Ogre
 		}
 		}
 
 
 		// Reset FSAA to none if previous doesn't avail in new possible values
 		// Reset FSAA to none if previous doesn't avail in new possible values
-		StringVector::const_iterator itValue =
+		std::vector<Ogre::String>::const_iterator itValue =
 			std::find(optFSAA->possibleValues.begin(),
 			std::find(optFSAA->possibleValues.begin(),
 			optFSAA->possibleValues.end(),
 			optFSAA->possibleValues.end(),
 			optFSAA->currentValue);
 			optFSAA->currentValue);

+ 2 - 2
CamelotRenderer/OgreRenderSystem.h

@@ -1257,7 +1257,7 @@ namespace Ogre
 		can raise.
 		can raise.
 		@see RenderSystem::addListener
 		@see RenderSystem::addListener
 		*/
 		*/
-		virtual const StringVector& getRenderSystemEvents(void) const { return mEventNames; }
+		virtual const std::vector<Ogre::String>& getRenderSystemEvents(void) const { return mEventNames; }
 
 
 		/** Tell the rendersystem to perform any prep tasks it needs to directly
 		/** Tell the rendersystem to perform any prep tasks it needs to directly
 		before other threads which might access the rendering API are registered.
 		before other threads which might access the rendering API are registered.
@@ -1362,7 +1362,7 @@ namespace Ogre
 		bool updatePassIterationRenderState(void);
 		bool updatePassIterationRenderState(void);
 
 
 		/// List of names of events this rendersystem may raise
 		/// List of names of events this rendersystem may raise
-		StringVector mEventNames;
+		std::vector<Ogre::String> mEventNames;
 
 
 		/// Internal method for firing a rendersystem event
 		/// Internal method for firing a rendersystem event
 		virtual void fireEvent(const String& name, const NameValuePairList* params = 0);
 		virtual void fireEvent(const String& name, const NameValuePairList* params = 0);

+ 1 - 1
CamelotRenderer/OgreRenderSystemCapabilities.cpp

@@ -60,7 +60,7 @@ namespace Ogre {
 	{
 	{
 	}
 	}
 	//---------------------------------------------------------------------
 	//---------------------------------------------------------------------
-	StringVector RenderSystemCapabilities::msGPUVendorStrings;
+	std::vector<Ogre::String> RenderSystemCapabilities::msGPUVendorStrings;
 	//---------------------------------------------------------------------
 	//---------------------------------------------------------------------
 	GPUVendor RenderSystemCapabilities::vendorFromString(const String& vendorString)
 	GPUVendor RenderSystemCapabilities::vendorFromString(const String& vendorString)
 	{
 	{

+ 2 - 3
CamelotRenderer/OgreRenderSystemCapabilities.h

@@ -32,7 +32,6 @@ THE SOFTWARE.
 #include "OgrePrerequisites.h"
 #include "OgrePrerequisites.h"
 #include "OgreString.h"
 #include "OgreString.h"
 #include "OgreStringConverter.h"
 #include "OgreStringConverter.h"
-#include "OgreStringVector.h"
 
 
 // Because there are more than 32 possible Capabilities, more than 1 int is needed to store them all.
 // Because there are more than 32 possible Capabilities, more than 1 int is needed to store them all.
 // In fact, an array of integers is used to store capabilities. However all the capabilities are defined in the single
 // In fact, an array of integers is used to store capabilities. However all the capabilities are defined in the single
@@ -190,7 +189,7 @@ namespace Ogre
 
 
 		void fromString(const String& versionString)
 		void fromString(const String& versionString)
 		{
 		{
-			StringVector tokens = StringUtil::split(versionString, ".");
+			std::vector<Ogre::String> tokens = StringUtil::split(versionString, ".");
 			if(!tokens.empty())
 			if(!tokens.empty())
 			{
 			{
 				major = StringConverter::parseInt(tokens[0]);
 				major = StringConverter::parseInt(tokens[0]);
@@ -243,7 +242,7 @@ namespace Ogre
 		/// GPU Vendor
 		/// GPU Vendor
 		GPUVendor mVendor;
 		GPUVendor mVendor;
 
 
-		static StringVector msGPUVendorStrings;
+		static std::vector<Ogre::String> msGPUVendorStrings;
 		static void initVendorStrings();
 		static void initVendorStrings();
 
 
 		/// The number of world matrices available
 		/// The number of world matrices available

+ 4 - 5
CamelotRenderer/OgreString.cpp

@@ -27,7 +27,6 @@ THE SOFTWARE.
 */
 */
 
 
 #include "OgreString.h"
 #include "OgreString.h"
-#include "OgreStringVector.h"
 
 
 namespace Ogre {
 namespace Ogre {
 
 
@@ -67,9 +66,9 @@ namespace Ogre {
     }
     }
 
 
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    StringVector StringUtil::split( const String& str, const String& delims, unsigned int maxSplits)
+    std::vector<Ogre::String> StringUtil::split( const String& str, const String& delims, unsigned int maxSplits)
     {
     {
-        StringVector ret;
+        std::vector<Ogre::String> ret;
         // Pre-allocate some space for performance
         // Pre-allocate some space for performance
         ret.reserve(maxSplits ? maxSplits+1 : 10);    // 10 is guessed capacity for most case
         ret.reserve(maxSplits ? maxSplits+1 : 10);    // 10 is guessed capacity for most case
 
 
@@ -109,9 +108,9 @@ namespace Ogre {
         return ret;
         return ret;
     }
     }
 	//-----------------------------------------------------------------------
 	//-----------------------------------------------------------------------
-	StringVector StringUtil::tokenise( const String& str, const String& singleDelims, const String& doubleDelims, unsigned int maxSplits)
+	std::vector<Ogre::String> StringUtil::tokenise( const String& str, const String& singleDelims, const String& doubleDelims, unsigned int maxSplits)
 	{
 	{
-        StringVector ret;
+        std::vector<Ogre::String> ret;
         // Pre-allocate some space for performance
         // Pre-allocate some space for performance
         ret.reserve(maxSplits ? maxSplits+1 : 10);    // 10 is guessed capacity for most case
         ret.reserve(maxSplits ? maxSplits+1 : 10);    // 10 is guessed capacity for most case
 
 

+ 3 - 3
CamelotRenderer/OgreStringConverter.cpp

@@ -229,10 +229,10 @@ namespace Ogre {
         return stream.str();
         return stream.str();
     }
     }
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    String StringConverter::toString(const StringVector& val)
+    String StringConverter::toString(const std::vector<Ogre::String>& val)
     {
     {
 		stringstream stream;
 		stringstream stream;
-        StringVector::const_iterator i, iend, ibegin;
+        std::vector<Ogre::String>::const_iterator i, iend, ibegin;
         ibegin = val.begin();
         ibegin = val.begin();
         iend = val.end();
         iend = val.end();
         for (i = ibegin; i != iend; ++i)
         for (i = ibegin; i != iend; ++i)
@@ -421,7 +421,7 @@ namespace Ogre {
         }
         }
     }
     }
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    StringVector StringConverter::parseStringVector(const String& val)
+    std::vector<Ogre::String> StringConverter::parseStringVector(const String& val)
     {
     {
         return StringUtil::split(val);
         return StringUtil::split(val);
     }
     }

+ 3 - 3
CamelotRenderer/OgreStringConverter.h

@@ -30,7 +30,7 @@ THE SOFTWARE.
 #define __StringConverter_H__
 #define __StringConverter_H__
 
 
 #include "OgrePrerequisites.h"
 #include "OgrePrerequisites.h"
-#include "OgreStringVector.h"
+#include "OgreString.h"
 #include "OgreColourValue.h"
 #include "OgreColourValue.h"
 #include "OgreMath.h"
 #include "OgreMath.h"
 #include "OgreMatrix3.h"
 #include "OgreMatrix3.h"
@@ -166,7 +166,7 @@ namespace Ogre {
             Strings must not contain spaces since space is used as a delimiter in
             Strings must not contain spaces since space is used as a delimiter in
             the output.
             the output.
         */
         */
-        static String toString(const StringVector& val);
+        static String toString(const std::vector<Ogre::String>& val);
 
 
         /** Converts a String to a Real. 
         /** Converts a String to a Real. 
         @returns
         @returns
@@ -254,7 +254,7 @@ namespace Ogre {
             Strings must not contain spaces since space is used as a delimiter in
             Strings must not contain spaces since space is used as a delimiter in
             the output.
             the output.
         */
         */
-        static StringVector parseStringVector(const String& val);
+        static std::vector<Ogre::String> parseStringVector(const String& val);
         /** Checks the String is a valid number value. */
         /** Checks the String is a valid number value. */
         static bool isNumber(const String& val);
         static bool isNumber(const String& val);
     };
     };

+ 0 - 53
CamelotRenderer/OgreStringVector.h

@@ -1,53 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#ifndef _StringVector_H__
-#define _StringVector_H__
-
-#include "OgrePrerequisites.h"
-
-#include "OgreString.h"
-#include "OgreSharedPtr.h"
-
-
-namespace Ogre {
-	/** \addtogroup Core
-	*  @{
-	*/
-	/** \addtogroup General
-	*  @{
-	*/
-
-    typedef vector<String>::type StringVector;
-    typedef SharedPtr<StringVector> StringVectorPtr;
-
-	/** @} */
-	/** @} */
-
-}
-
-#endif

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLLinkProgram.cpp

@@ -183,7 +183,7 @@ namespace Ogre {
 						{
 						{
 							// final check 
 							// final check 
 							String expr = vpSource.substr(startpos, pos + a.name.length() - startpos);
 							String expr = vpSource.substr(startpos, pos + a.name.length() - startpos);
-							StringVector vec = StringUtil::split(expr);
+							std::vector<Ogre::String> vec = StringUtil::split(expr);
 							if ((vec[0] == "in" || vec[0] == "attribute") && vec[2] == a.name)
 							if ((vec[0] == "in" || vec[0] == "attribute") && vec[2] == a.name)
 								glBindAttribLocationARB(mGLHandle, a.attrib, a.name.c_str());
 								glBindAttribLocationARB(mGLHandle, a.attrib, a.name.c_str());
 						}
 						}

+ 2 - 2
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLLinkProgramManager.cpp

@@ -440,9 +440,9 @@ namespace Ogre {
 					 sqp = line.find (" ["))
 					 sqp = line.find (" ["))
 					line.erase (sqp, 1);
 					line.erase (sqp, 1);
 				// Split into tokens
 				// Split into tokens
-				StringVector parts = StringUtil::split(line, ", \t\r\n");
+				std::vector<Ogre::String> parts = StringUtil::split(line, ", \t\r\n");
 
 
-				for (StringVector::iterator i = parts.begin(); i != parts.end(); ++i)
+				for (std::vector<Ogre::String>::iterator i = parts.begin(); i != parts.end(); ++i)
 				{
 				{
 					// Is this a type?
 					// Is this a type?
 					StringToEnumMap::iterator typei = mTypeEnumMap.find(*i);
 					StringToEnumMap::iterator typei = mTypeEnumMap.find(*i);

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLProgram.cpp

@@ -300,7 +300,7 @@ namespace Ogre {
     void GLSLProgram::CmdAttach::doSet(void *target, const String& shaderNames)
     void GLSLProgram::CmdAttach::doSet(void *target, const String& shaderNames)
     {
     {
 		//get all the shader program names: there could be more than one
 		//get all the shader program names: there could be more than one
-		StringVector vecShaderNames = StringUtil::split(shaderNames, " \t", 0);
+		std::vector<Ogre::String> vecShaderNames = StringUtil::split(shaderNames, " \t", 0);
 
 
 		size_t programNameCount = vecShaderNames.size();
 		size_t programNameCount = vecShaderNames.size();
 		for ( size_t i = 0; i < programNameCount; ++i )
 		for ( size_t i = 0; i < programNameCount; ++i )

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/OgreGLRenderSystem.cpp

@@ -977,7 +977,7 @@ namespace Ogre {
 			// set up glew and GLSupport
 			// set up glew and GLSupport
 			initialiseContext(win);
 			initialiseContext(win);
 
 
-			StringVector tokens = StringUtil::split(mGLSupport->getGLVersion(), ".");
+			std::vector<Ogre::String> tokens = StringUtil::split(mGLSupport->getGLVersion(), ".");
 
 
 			if (!tokens.empty())
 			if (!tokens.empty())
 			{
 			{

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/OgreWin32GLSupport.cpp

@@ -273,7 +273,7 @@ namespace Ogre {
 			opt = mOptions.find("FSAA");
 			opt = mOptions.find("FSAA");
 			if (opt == mOptions.end())
 			if (opt == mOptions.end())
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find FSAA options!", "Win32GLSupport::createWindow");
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find FSAA options!", "Win32GLSupport::createWindow");
-			StringVector aavalues = StringUtil::split(opt->second.currentValue, " ", 1);
+			std::vector<Ogre::String> aavalues = StringUtil::split(opt->second.currentValue, " ", 1);
 			unsigned int multisample = StringConverter::parseUnsignedInt(aavalues[0]);
 			unsigned int multisample = StringConverter::parseUnsignedInt(aavalues[0]);
 			String multisample_hint;
 			String multisample_hint;
 			if (aavalues.size() > 1)
 			if (aavalues.size() > 1)