summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-05 21:28:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-16 14:26:37 -0700
commit7aca64bfca4b9937369a271da8ed5f9445bb4bad (patch)
tree03f30afc716e0eaff3221123dbf53f66a5a5f04b
parent7415824a8c6a650bba185686f389b34bcd3ea854 (diff)
downloadsubsurface-7aca64bfca4b9937369a271da8ed5f9445bb4bad.tar.gz
cleanup: remove device::operator!=()
This was not used. Moreover, mark device::operator==() for removal. This is used for detecting changes in the DiveComputerModel. This can be removed once that is integrated into the undo system. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/device.cpp5
-rw-r--r--core/device.h3
2 files changed, 1 insertions, 7 deletions
diff --git a/core/device.cpp b/core/device.cpp
index b688e36eb..1c0d6d5c6 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -203,11 +203,6 @@ bool device::operator==(const device &a) const
nickName == a.nickName;
}
-bool device::operator!=(const device &a) const
-{
- return !(*this == a);
-}
-
bool device::operator<(const device &a) const
{
return std::tie(deviceId, model) < std::tie(a.deviceId, a.model);
diff --git a/core/device.h b/core/device.h
index 22163e56c..c401fd6a0 100644
--- a/core/device.h
+++ b/core/device.h
@@ -45,8 +45,7 @@ const char *device_get_nickname(const struct device *dev);
#include <string>
#include <vector>
struct device {
- bool operator==(const device &a) const;
- bool operator!=(const device &a) const;
+ bool operator==(const device &a) const; // TODO: remove, once devices are integrated in the undo system
bool operator<(const device &a) const;
void showchanges(const std::string &n, const std::string &s, const std::string &f) const;
std::string model;