From 5f63d5039bcca80241b12655c250a4238b936a74 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 7 Nov 2016 14:01:23 -0800 Subject: Bug fixes, self test of JSONDB disabled by default. --- controller/JSONDB.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'controller') 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; -- cgit v1.2.3