summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx18
1 files changed, 2 insertions, 16 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 1c4fe33..11f3b81 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -22,7 +22,6 @@
#include KWSYS_HEADER(FStream.hxx)
#include KWSYS_HEADER(Encoding.hxx)
-#include <algorithm>
#include <fstream>
#include <iostream>
#include <set>
@@ -848,6 +847,8 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
free(orig);
}
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
#if defined(KEY_WOW64_32KEY) && defined(KEY_WOW64_64KEY)
#define KWSYS_ST_KEY_WOW64_32KEY KEY_WOW64_32KEY
#define KWSYS_ST_KEY_WOW64_64KEY KEY_WOW64_64KEY
@@ -856,7 +857,6 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
#define KWSYS_ST_KEY_WOW64_64KEY 0x0100
#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
static bool SystemToolsParseRegistryKey(const std::string& key,
HKEY& primaryKey, std::string& second,
std::string& valuename)
@@ -3709,16 +3709,6 @@ std::string SystemTools::JoinPath(
return result;
}
-void SystemTools::RemoveEmptyPathElements(std::vector<std::string>& path)
-{
- if (path.empty()) {
- return;
- }
-
- path.erase(std::remove(path.begin() + 1, path.end(), std::string("")),
- path.end());
-}
-
bool SystemTools::ComparePath(const std::string& c1, const std::string& c2)
{
#if defined(_WIN32) || defined(__APPLE__)
@@ -3807,11 +3797,7 @@ std::string SystemTools::GetFilenamePath(const std::string& filename)
*/
std::string SystemTools::GetFilenameName(const std::string& filename)
{
-#if defined(_WIN32)
std::string::size_type slash_pos = filename.find_last_of("/\\");
-#else
- std::string::size_type slash_pos = filename.rfind('/');
-#endif
if (slash_pos != std::string::npos) {
return filename.substr(slash_pos + 1);
} else {