X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fpath.cpp;h=c56505e907eb3fd9ce756f430f23e6f22aed7bd1;hp=035e2200609bf5f6b4f1c4e6ca59a31a6e22cf6f;hb=fbc986fca28ce01240718a7835ee7e4798b5d20d;hpb=dce2985e07e6184f000ef176451150710e21ee35 diff --git a/source/fs/path.cpp b/source/fs/path.cpp index 035e220..c56505e 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -183,12 +183,30 @@ string Path::operator[](int n) const throw invalid_argument("Path::operator[]"); } -bool Path::operator==(const Path &p) const +bool Path::operator==(const Path &other) const { #ifdef WIN32 - return !strcasecmp(path, p.path); + return strcasecmp(path, other.path)==0; #else - return path==p.path; + return path==other.path; +#endif +} + +bool Path::operator<(const Path &other) const +{ +#ifdef WIN32 + return strcasecmp(path, other.path)<0; +#else + return path(const Path &other) const +{ +#ifdef WIN32 + return strcasecmp(path, other.path)>0; +#else + return path>other.path; #endif }