refactor: remove unused ARCH::concatPath

This commit is contained in:
sithlord48
2025-03-17 22:13:59 -04:00
committed by Nick Bolton
parent 8609cbc20a
commit b1b8720781
5 changed files with 0 additions and 35 deletions

View File

@ -32,13 +32,4 @@ public:
Returns the directory in which Deskflow is installed.
*/
virtual std::string getInstalledDirectory() = 0;
//! Concatenate path components
/*!
Concatenate pathname components with a directory separator
between them. This should not check if the resulting path
is longer than allowed by the system; we'll rely on the
system calls to tell us that.
*/
virtual std::string concatPath(const std::string &prefix, const std::string &suffix) = 0;
};

View File

@ -53,15 +53,3 @@ std::string ArchFileUnix::getInstalledDirectory()
return rtn;
#endif
}
std::string ArchFileUnix::concatPath(const std::string &prefix, const std::string &suffix)
{
std::string path;
path.reserve(prefix.size() + 1 + suffix.size());
path += prefix;
if (path.size() == 0 || path[path.size() - 1] != '/') {
path += '/';
}
path += suffix;
return path;
}

View File

@ -21,5 +21,4 @@ public:
// IArchFile overrides
virtual const char *getBasename(const char *pathname);
virtual std::string getInstalledDirectory();
virtual std::string concatPath(const std::string &prefix, const std::string &suffix);
};

View File

@ -60,15 +60,3 @@ std::string ArchFileWindows::getInstalledDirectory()
return fileName;
}
std::string ArchFileWindows::concatPath(const std::string &prefix, const std::string &suffix)
{
std::string path;
path.reserve(prefix.size() + 1 + suffix.size());
path += prefix;
if (path.size() == 0 || (path[path.size() - 1] != '\\' && path[path.size() - 1] != '/')) {
path += '\\';
}
path += suffix;
return path;
}

View File

@ -21,5 +21,4 @@ public:
// IArchFile overrides
virtual const char *getBasename(const char *pathname);
virtual std::string getInstalledDirectory();
virtual std::string concatPath(const std::string &prefix, const std::string &suffix);
};