From f7c8284ae76ce8be1edb0bcdf3729bbda23b73c7 Mon Sep 17 00:00:00 2001
From: Dmitrij Naumov <dmitrij@naumov.de>
Date: Wed, 31 Oct 2012 23:14:46 +0100
Subject: [PATCH] Hide findLastPathSeparator() from interface.

---
 BaseLib/FileTools.cpp                            | 5 +++++
 BaseLib/FileTools.h                              | 7 -------
 Tests/BaseLib/TestFilePathStringManipulation.cpp | 1 +
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp
index 3fef890ea66..4be8108333e 100644
--- a/BaseLib/FileTools.cpp
+++ b/BaseLib/FileTools.cpp
@@ -61,6 +61,11 @@ void truncateFile( std::string const& filename)
     ofs.close();
 }
 
+/** Finds the position of last file path separator.
+ * Checks for unix or windows file path separators in given path and returns the
+ * position of the last one or std::string::npos if no file path separator was
+ * found.
+ */
 size_t findLastPathSeparator(std::string const& path)
 {
 	return path.find_last_of("/\\");
diff --git a/BaseLib/FileTools.h b/BaseLib/FileTools.h
index 113298dd311..78d7b1e6c0b 100644
--- a/BaseLib/FileTools.h
+++ b/BaseLib/FileTools.h
@@ -21,13 +21,6 @@
 namespace BaseLib
 {
 
-/** Finds the position of last file path separator.
- * Checks for unix or windows file path separators in given path and returns the
- * position of the last one or std::string::npos if no file path separator was
- * found.
- */
-size_t findLastPathSeparator(std::string const& path);
-
 /**
  * \brief Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html
  *
diff --git a/Tests/BaseLib/TestFilePathStringManipulation.cpp b/Tests/BaseLib/TestFilePathStringManipulation.cpp
index 44d7f8d99a0..89a40f5565b 100644
--- a/Tests/BaseLib/TestFilePathStringManipulation.cpp
+++ b/Tests/BaseLib/TestFilePathStringManipulation.cpp
@@ -8,6 +8,7 @@
 #include "gtest.h"
 
 #include "FileTools.h"
+#include "FileTools.cpp"
 
 TEST(BaseLib, FindLastPathSeparatorWin)
 {
-- 
GitLab