Skip to content

Commit bd43cb9

Browse files
committed
Add constness to old Persistent comparison operators
1 parent 62e7c84 commit bd43cb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nan_persistent_pre_12_inl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ class PersistentBase {
6464
inline void Empty() { persistent.Clear(); }
6565

6666
template<typename S>
67-
inline bool operator==(const PersistentBase<S> &that) {
67+
inline bool operator==(const PersistentBase<S> &that) const {
6868
return this->persistent == that.persistent;
6969
}
7070

7171
template<typename S>
72-
inline bool operator==(const v8::Local<S> &that) {
72+
inline bool operator==(const v8::Local<S> &that) const {
7373
return this->persistent == that;
7474
}
7575

7676
template<typename S>
77-
inline bool operator!=(const PersistentBase<S> &that) {
77+
inline bool operator!=(const PersistentBase<S> &that) const {
7878
return !operator==(that);
7979
}
8080

8181
template<typename S>
82-
inline bool operator!=(const v8::Local<S> &that) {
82+
inline bool operator!=(const v8::Local<S> &that) const {
8383
return !operator==(that);
8484
}
8585

0 commit comments

Comments
 (0)