Commit 7ffb7106 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

SystemTools: Use the iterator constructor for strings

We have them, so save the subtraction.

Change-Id: Iae5a623b2f77323f6bcf701eeb5fb688f900262a
parent c1296f4a
......@@ -3536,9 +3536,7 @@ void SystemTools::SplitPath(const char* p,
if(*last == '/' || *last == '\\')
{
// End of a component. Save it.
components.push_back(
kwsys_stl::string(first,static_cast<kwsys_stl::string::size_type>(
last-first)));
components.push_back(kwsys_stl::string(first, last));
first = last+1;
}
}
......@@ -3546,9 +3544,7 @@ void SystemTools::SplitPath(const char* p,
// Save the last component unless there were no components.
if(last != c)
{
components.push_back(
kwsys_stl::string(first,static_cast<kwsys_stl::string::size_type>(
last-first)));
components.push_back(kwsys_stl::string(first, last));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment