Skip to content

Commit

Permalink
couple more methods in util class
Browse files Browse the repository at this point in the history
  • Loading branch information
dwight committed Dec 30, 2010
1 parent ca311f1 commit aa5d394
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions util/paths.h
Expand Up @@ -32,6 +32,8 @@ namespace mongo {
struct RelativePath {
string _p;

bool empty() const { return _p.empty(); }

static RelativePath fromRelativePath(string f) {
RelativePath rp;
rp._p = f;
Expand Down Expand Up @@ -62,8 +64,9 @@ namespace mongo {

string toString() const { return _p; }

inline bool operator!=(const RelativePath& r) const { return _p != r._p; }
inline bool operator==(const RelativePath& r) const { return _p == r._p; }
bool operator!=(const RelativePath& r) const { return _p != r._p; }
bool operator==(const RelativePath& r) const { return _p == r._p; }
bool operator<(const RelativePath& r) const { return _p < r._p; }

string asFullPath() const {
path x(dbpath);
Expand Down

0 comments on commit aa5d394

Please sign in to comment.