| 269 | } |
| 270 | |
| 271 | void convertToOSPath(const char* path, char* pathOS) |
| 272 | { |
| 273 | #ifdef _WIN32 |
| 274 | const size_t len = strlen(path); |
| 275 | for (size_t i = 0; i < len; i++) |
| 276 | { |
| 277 | if (path[i] == '/') |
| 278 | { |
| 279 | pathOS[i] = '\\'; |
| 280 | } |
| 281 | else |
| 282 | { |
| 283 | pathOS[i] = path[i]; |
| 284 | } |
| 285 | } |
| 286 | #else |
| 287 | const size_t len = strlen(path); |
| 288 | for (size_t i = 0; i < len; i++) |
| 289 | { |
| 290 | if (path[i] == '\\') |
| 291 | { |
| 292 | pathOS[i] = '/'; |
| 293 | } |
| 294 | else |
| 295 | { |
| 296 | pathOS[i] = path[i]; |
| 297 | } |
| 298 | } |
| 299 | #endif |
| 300 | pathOS[len] = 0; |
| 301 | } |
| 302 | |
| 303 | void replaceExtension(const char* srcPath, const char* newExt, char* outPath) |
| 304 | { |
no outgoing calls
no test coverage detected