From 058953b54ba1a3fbf95db92a0e60e6c9581bfb6b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 24 Aug 2006 14:15:26 +0000 Subject: [PATCH] Move is_windows_drive into utils.h --- source/path.cpp | 5 ----- source/utils.h | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) 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 -- 2.45.2