/// MemoryBuffer::getFile instead.
static void UnMapFilePages(const char *Base, uint64_t FileSize);
-
- /// @}
- /// @name Internal methods.
- /// @{
- protected:
- std::string getDirnameCharSep(char Sep) const;
-
/// @}
/// @name Data
/// @{
Paths.push_back(tmpPath);
}
-std::string Path::getDirnameCharSep(char Sep) const {
+static std::string getDirnameCharSep(const std::string& path, char Sep) {
if (path.empty())
return ".";
}
-std::string Path::getDirname() const { return getDirnameCharSep('/'); }
+std::string Path::getDirname() const {
+ return getDirnameCharSep(path, '/');
+}
std::string
Path::getBasename() const {
return len > 0 && path[len-1] == '/';
}
-std::string Path::getDirname() const { return getDirnameCharSep('\\'); }
+std::string Path::getDirname() const {
+ return getDirnameCharSep(path, '\\');
+}
std::string
Path::getBasename() const {