From 601e088dc38005e4346766a09129a80e81c637f3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 6 Jul 2012 15:33:13 +0300 Subject: [PATCH] Very minor refactoring --- source/fs/path.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/fs/path.cpp b/source/fs/path.cpp index c56505e..f12e274 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -7,8 +7,10 @@ using namespace std; namespace { +#ifdef WIN32 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]==':'); } +#endif } @@ -63,9 +65,7 @@ bool Path::is_absolute() const if(is_windows_drive((*this)[0])) return true; #endif - if(path[0]==DIRSEP) - return true; - return false; + return path[0]==DIRSEP; } Path Path::subpath(unsigned start, unsigned count) const -- 2.43.0