aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2013-12-29 15:47:23 -0500
committerSubv <subv2112@gmail.com>2013-12-29 15:47:23 -0500
commitd30eecf4e4b7766b7f46b9ca3f0c6741b08d79af (patch)
tree964b61d604c58a59e4aac3fccbdb277a9b10734d
parentd234d0f3d0889e799eb066ba39c9b1edbc964d6e (diff)
Updated some code to use the STL
-rw-r--r--src/tools/mesh_extractor/Utils.cpp10
-rw-r--r--src/tools/mesh_extractor/Utils.h2
2 files changed, 3 insertions, 9 deletions
diff --git a/src/tools/mesh_extractor/Utils.cpp b/src/tools/mesh_extractor/Utils.cpp
index c2a7577937a..0591c121895 100644
--- a/src/tools/mesh_extractor/Utils.cpp
+++ b/src/tools/mesh_extractor/Utils.cpp
@@ -54,15 +54,9 @@ void Utils::CreateDir( const std::string& Path )
#endif
}
-void Utils::Reverse(char word[])
+void Utils::Reverse(std::string& str)
{
- int len = strlen(word);
- for (int i = 0;i < len / 2; i++)
- {
- word[i] ^= word[len-i-1];
- word[len-i-1] ^= word[i];
- word[i] ^= word[len-i-1];
- }
+ std::reverse(str.begin(), str.end());
}
Vector3 Utils::ToRecast(const Vector3& val )
diff --git a/src/tools/mesh_extractor/Utils.h b/src/tools/mesh_extractor/Utils.h
index ad521852271..87b6a40582a 100644
--- a/src/tools/mesh_extractor/Utils.h
+++ b/src/tools/mesh_extractor/Utils.h
@@ -367,7 +367,7 @@ struct MmapTileHeader
class Utils
{
public:
- static void Reverse(char word[]);
+ static void Reverse(std::string& str);
static Vector3 ToRecast(const Vector3& val );
static std::string GetAdtPath(const std::string& world, int x, int y);
static std::string FixModelPath(const std::string& path);