From 7ffb710675997126bb08ffa2e4b7d4aa17d49702 Mon Sep 17 00:00:00 2001
From: Ben Boeckel <ben.boeckel@kitware.com>
Date: Sat, 8 Feb 2014 03:48:26 -0500
Subject: [PATCH] SystemTools: Use the iterator constructor for strings

We have them, so save the subtraction.

Change-Id: Iae5a623b2f77323f6bcf701eeb5fb688f900262a
---
 SystemTools.cxx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/SystemTools.cxx b/SystemTools.cxx
index 12d93e2a..93c45278 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -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));
     }
 }
 
-- 
GitLab