MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AppendPathSeparator

Function AppendPathSeparator

src/fileio.cpp:348–353  ·  view source on GitHub ↗

* Appends, if necessary, the path separator character to the end of the string. * It does not add the path separator to zero-sized strings. * @param buf string to append the separator to * @return true iff the operation succeeded */

Source from the content-addressed store, hash-verified

346 * @return true iff the operation succeeded
347 */
348void AppendPathSeparator(std::string &buf)
349{
350 if (buf.empty()) return;
351
352 if (buf.back() != PATHSEPCHAR) buf.push_back(PATHSEPCHAR);
353}
354
355/**
356 * Simplify filenames from tars.

Callers 6

DoScanWorkingDirectoryFunction · 0.85
DetermineBasePathsFunction · 0.85
DeterminePathsFunction · 0.85
ScanMethod · 0.85
DetermineBasePathsFunction · 0.85
GetSMFFileMethod · 0.85

Calls 2

push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected