From: Mikko Rasa Date: Thu, 24 Aug 2006 14:15:26 +0000 (+0000) Subject: Move is_windows_drive into utils.h X-Git-Tag: fs-1.0~27 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=058953b54ba1a3fbf95db92a0e60e6c9581bfb6b;p=libs%2Fcore.git Move is_windows_drive into utils.h --- diff --git a/source/path.cpp b/source/path.cpp index ff6713f..93a0a84 100644 --- a/source/path.cpp +++ b/source/path.cpp @@ -12,11 +12,6 @@ using namespace std; namespace Msp { namespace Path { -bool is_windows_drive(const std::string &p) -{ - return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); -} - /** Returns the number of components in the path. */ diff --git a/source/utils.h b/source/utils.h index e0c559d..961ad49 100644 --- a/source/utils.h +++ b/source/utils.h @@ -35,6 +35,9 @@ inline int stat(const Path &fn, struct stat &st) inline Path getcwd() { char buf[1024]; return ::getcwd(buf, sizeof(buf)); } +inline bool is_windows_drive(const std::string &p) +{ return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); } + } // namespace Path } // namespace Msp