Skip to content

Commit 40908cf

Browse files
committed
made comparison operators constant expressions
1 parent 878c18f commit 40908cf

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/objects/statement/statement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Statement : public Nan::ObjectWrap, public Query {
1717
static void Init();
1818

1919
class Compare { public:
20-
bool operator() (const Statement*, const Statement*);
20+
bool operator() (const Statement*, const Statement*) const;
2121
};
2222
v8::Local<v8::Object> GetBindMap();
2323

src/objects/statement/util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Used by std::set to organize the pointers it holds.
2-
bool Statement::Compare::operator() (const Statement* a, const Statement* b) {
2+
bool Statement::Compare::operator() (const Statement* a, const Statement* b) const {
33
return a->id < b->id;
44
}
55

src/objects/transaction/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Transaction : public Nan::ObjectWrap, public Query {
1616
static void Init();
1717

1818
class Compare { public:
19-
bool operator() (const Transaction*, const Transaction*);
19+
bool operator() (const Transaction*, const Transaction*) const;
2020
};
2121
v8::Local<v8::Object> GetBindMap();
2222

src/objects/transaction/util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Used by std::set to organize the pointers it holds.
2-
bool Transaction::Compare::operator() (const Transaction* a, const Transaction* b) {
2+
bool Transaction::Compare::operator() (const Transaction* a, const Transaction* b) const {
33
return a->id < b->id;
44
}
55

0 commit comments

Comments
 (0)