mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Updated some code to use the STL
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user