0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

OID <= operator

This commit is contained in:
Eliot Horowitz 2011-01-03 14:11:53 -05:00
parent e869f00e1d
commit 5266e0fd8a

View File

@ -52,6 +52,7 @@ namespace mongo {
bool operator!=(const OID& r) const { return a!=r.a || b!=r.b; }
int compare( const OID& other ) const { return memcmp( data , other.data , 12 ); }
bool operator<( const OID& other ) const { return compare( other ) < 0; }
bool operator<=( const OID& other ) const { return compare( other ) <= 0; }
/** @return the object ID output as 24 hex digits */
string str() const { return toHexLower(data, 12); }