MCPcopy Create free account
hub / github.com/comaps/comaps / TruncateFileName

Method TruncateFileName

libs/base/src_point.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace base
7{
8void SrcPoint::TruncateFileName()
9{
10 size_t const maxLen = 10000;
11 char const * p[] = {m_fileName, m_fileName};
12 for (size_t i = 0; i < maxLen && m_fileName[i]; ++i)
13 {
14 if (m_fileName[i] == '\\' || m_fileName[i] == '/')
15 {
16 std::swap(p[0], p[1]);
17 p[0] = m_fileName + i + 1;
18 }
19 }
20 m_fileName = p[1];
21}
22
23std::string DebugPrint(SrcPoint const & srcPoint)
24{

Callers

nothing calls this directly

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected