diff --git a/SystemTools.cxx b/SystemTools.cxx
index 38910c8d1eaf716615a78dfd43eef7ebecda2eed..3e91a07593a7272e40c23bf24b6ccf7b9e42ba2c 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -27,7 +27,6 @@
 #include <iostream>
 #include <set>
 #include <sstream>
-#include <utility>
 #include <vector>
 
 // Work-around CMake dependency scanning limitation.  This must
@@ -3342,7 +3341,7 @@ std::string SystemTools::RelativePath(const std::string& local,
 }
 
 #ifdef _WIN32
-static std::pair<std::string, bool> GetCasePathName(std::string const& pathIn)
+static std::string GetCasePathName(std::string const& pathIn)
 {
   std::string casePath;
   std::vector<std::string> path_components;
@@ -3351,7 +3350,7 @@ static std::pair<std::string, bool> GetCasePathName(std::string const& pathIn)
   {
     // Relative paths cannot be converted.
     casePath = pathIn;
-    return std::make_pair(casePath, false);
+    return casePath;
   }
 
   // Start with root component.
@@ -3403,7 +3402,7 @@ static std::pair<std::string, bool> GetCasePathName(std::string const& pathIn)
 
     casePath += path_components[idx];
   }
-  return std::make_pair(casePath, converting);
+  return casePath;
 }
 #endif
 
@@ -3418,14 +3417,12 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p)
   if (i != SystemTools::PathCaseMap->end()) {
     return i->second;
   }
-  std::pair<std::string, bool> casePath = GetCasePathName(p);
-  if (casePath.first.size() > MAX_PATH) {
-    return casePath.first;
+  std::string casePath = GetCasePathName(p);
+  if (casePath.size() > MAX_PATH) {
+    return casePath;
   }
-  if (casePath.second) {
-    (*SystemTools::PathCaseMap)[p] = casePath.first;
-  }
-  return casePath.first;
+  (*SystemTools::PathCaseMap)[p] = casePath;
+  return casePath;
 #endif
 }