MCPcopy Create free account
hub / github.com/Illation/ETEngine / UnifyPathDelimiters

Method UnifyPathDelimiters

Engine/source/EtCore/FileSystem/FileUtil.cpp:265–276  ·  view source on GitHub ↗

--------------------------------- FileUtil::RemoveExcessPathDelimiters Makes all path delimiters forward slashes

Source from the content-addressed store, hash-verified

263// Makes all path delimiters forward slashes
264//
265void FileUtil::UnifyPathDelimiters(std::string& path)
266{
267 // loop from the back so that our index stays valid as we remove elements
268 for (size_t idx = path.size() - 1; idx > 0; --idx)
269 {
270 // check if the current character is a delimiter
271 if (std::find(pathDelimiters.cbegin(), pathDelimiters.cend(), path[idx]) != pathDelimiters.cend())
272 {
273 path[idx] = s_PathDelimiter;
274 }
275 }
276}
277
278//---------------------------------
279// FileUtil::RemoveExcessPathDelimiters

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected