Changeset 2509 for code/branches/buildsystem2/src/util
- Timestamp:
- Dec 17, 2008, 8:59:48 PM (16 years ago)
- Location:
- code/branches/buildsystem2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2
- Property svn:ignore deleted
- Property svn:mergeinfo changed
/code/branches/buildsystem (added) merged: 1875,1882-1886,1975-1982,1991,1999,2054,2061,2135,2137-2139,2197-2199,2204,2214-2220,2223-2224,2229,2233-2244,2248-2249,2252-2253,2260,2275
-
code/branches/buildsystem2/src/util
- Property svn:mergeinfo changed
/code/branches/buildsystem/src/util (added) merged: 2197-2198,2244
- Property svn:mergeinfo changed
-
code/branches/buildsystem2/src/util/CMakeLists.txt
r2295 r2509 14 14 15 15 ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES}) 16 TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY}) 16 17 17 TARGET_LINK_LIBRARIES(util18 ${OGRE_LIBRARIES}19 18 ) 19 -
code/branches/buildsystem2/src/util/Exception.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/branches/buildsystem2/src/util/Exception.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/branches/buildsystem2/src/util/String.cc
r2171 r2509 493 493 } 494 494 } 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
r2171 r2509 81 81 } 82 82 83 _UtilExport void convertToWindowsPath(std::string* str); 84 _UtilExport void convertToUnixPath(std::string* str); 85 83 86 #endif /* _Util_String_H__ */
Note: See TracChangeset
for help on using the changeset viewer.