MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / _resolveLeadingSlash

Function _resolveLeadingSlash

Engine/source/platform/platformFileIO.cpp:234–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232// FIXME: this is not ideal. the c: drive is not guaranteed to exist.
233#if defined(TORQUE_OS_WIN)
234static inline void _resolveLeadingSlash(char* buf, U32 size)
235{
236 if(buf[0] != '/')
237 return;
238
239 AssertFatal(dStrlen(buf) + 2 < size, "Expanded path would be too long");
240 dMemmove(buf + 2, buf, dStrlen(buf));
241 buf[0] = 'c';
242 buf[1] = ':';
243}
244#endif
245
246static void makeCleanPathInPlace( char* path )

Callers 1

makeFullPathNameMethod · 0.85

Calls 2

dStrlenFunction · 0.50
dMemmoveFunction · 0.50

Tested by

no test coverage detected