diff --git a/tools/supported/tiletypes.cpp b/tools/supported/tiletypes.cpp index 8d8fd625a..7b031f34c 100644 --- a/tools/supported/tiletypes.cpp +++ b/tools/supported/tiletypes.cpp @@ -13,14 +13,23 @@ using namespace std; #include #include +//zilpin: These two functions were giving me compile errors in VS2008, so I cheated with the C style loop below, just to get it to build. +//Original code is commented out. void tolower(std::string &str) { - std::transform(str.begin(), str.end(), str.begin(), std::bind2nd(std::ptr_fun(&std::tolower), std::locale(""))); + //The C++ way... + //std::transform(str.begin(), str.end(), str.begin(), std::bind2nd(std::ptr_fun(&std::tolower ), std::locale(""))); + + //The C way... + for(char *c=(char *)str.c_str(); *c; ++c) + *c = tolower(*c); } void toupper(std::string &str) { - std::transform(str.begin(), str.end(), str.begin(), std::bind2nd(std::ptr_fun(&std::toupper), std::locale(""))); + //std::transform(str.begin(), str.end(), str.begin(), std::bind2nd(std::ptr_fun(&std::toupper), std::locale(""))); + for(char *c=(char *)str.c_str(); *c; ++c) + *c = toupper(*c); } int toint(const std::string &str, int failValue = 0)