Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2008, 7:12:44 PM (16 years ago)
Author:
rgrieder
Message:
  • Removed ugly hack with windows/unix file path conversion.
  • Removed obsolete entries in msvc files (tolua_bind.h)
Location:
code/branches/buildsystem2/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/src/util/String.cc

    r2509 r2534  
    493493    }
    494494}
    495 
    496 /**
    497     @brief Converts a path string to windows with "\" instead of "/".
    498     @param str String pointer to be manipulated
    499 */
    500 void convertToWindowsPath(std::string* str)
    501 {
    502     std::string& path = *str;
    503     // replace all occurences of "/" with "\"
    504     for (unsigned int i = 0; i < path.length(); ++i)
    505     {
    506         if (path[i] == '/')
    507             path[i] = '\\';
    508     }
    509     // add an extra '\\' at the end to make it a complete path
    510     if (path != "" && path[path.length() - 1] != '\\')
    511         path.append("\\");
    512 }
    513 
    514 /**
    515     @brief Converts a path string to unix with "/" instead of "\".
    516     @param str String pointer to be manipulated
    517 */
    518 void convertToUnixPath(std::string* str)
    519 {
    520     std::string& path = *str;
    521     // replace all occurences of "\" with "/"
    522     for (unsigned int i = 0; i < path.length(); ++i)
    523     {
    524         if (path[i] == '\\')
    525             path[i] = '/';
    526     }
    527     // add an extra '\\' at the end to make it a complete path
    528     if (path != "" && path[path.length() - 1] != '/')
    529         path.append("/");
    530 }
  • code/branches/buildsystem2/src/util/String.h

    r2509 r2534  
    8181}
    8282
    83 _UtilExport void         convertToWindowsPath(std::string* str);
    84 _UtilExport void         convertToUnixPath(std::string* str);
    85 
    8683#endif /* _Util_String_H__ */
Note: See TracChangeset for help on using the changeset viewer.