Fixes the directory separators for the current platform */
| 209 | |
| 210 | /** Fixes the directory separators for the current platform */ |
| 211 | std::string Path_FixSlashes( const std::string & sPath, char slash ) |
| 212 | { |
| 213 | if( slash == 0 ) |
| 214 | slash = Path_GetSlash(); |
| 215 | |
| 216 | std::string sFixed = sPath; |
| 217 | for( std::string::iterator i = sFixed.begin(); i != sFixed.end(); i++ ) |
| 218 | { |
| 219 | if( *i == '/' || *i == '\\' ) |
| 220 | *i = slash; |
| 221 | } |
| 222 | |
| 223 | return sFixed; |
| 224 | } |
| 225 | |
| 226 | |
| 227 | char Path_GetSlash() |
no test coverage detected