diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-07 14:01:23 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-07 14:01:23 -0800 |
| commit | 5f63d5039bcca80241b12655c250a4238b936a74 (patch) | |
| tree | cd58ced7085f7b282fbb8f45e2bfa0733f451c48 /controller | |
| parent | a454a37a6e171f2a9101680de4c2dfda2c2246f5 (diff) | |
| download | infinitytier-5f63d5039bcca80241b12655c250a4238b936a74.tar.gz infinitytier-5f63d5039bcca80241b12655c250a4238b936a74.zip | |
Bug fixes, self test of JSONDB disabled by default.
Diffstat (limited to 'controller')
| -rw-r--r-- | controller/JSONDB.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp index 61735655..a9a5e6ac 100644 --- a/controller/JSONDB.hpp +++ b/controller/JSONDB.hpp @@ -88,6 +88,9 @@ public: } } + inline bool operator==(const JSONDB &db) const { return ((_basePath == db._basePath)&&(_db == db._db)); } + inline bool operator!=(const JSONDB &db) const { return (!(*this == db)); } + private: void _reload(const std::string &p); bool _isValidObjectName(const std::string &n); @@ -98,6 +101,9 @@ private: nlohmann::json obj; uint64_t lastModifiedOnDisk; uint64_t lastCheck; + + inline bool operator==(const _E &e) const { return (obj == e.obj); } + inline bool operator!=(const _E &e) const { return (obj != e.obj); } }; std::string _basePath; |
