@@ -51,19 +51,9 @@ namespace mtconnect::entity {
51
51
// / @brief the other value to compare
52
52
const T &m_other;
53
53
};
54
-
55
- // / @brief compares two cell values
56
- // / @param other the other cell value to compare
57
- template <typename T>
58
- struct SameValue {
59
- bool operator ()(const T &v1, const T &v2)
60
- {
61
- return std::visit (SameValueVisitor<T>(v1), v2);
62
- }
63
- };
64
-
54
+
65
55
// / @brief One entry in a data set. Has necessary interface to be work with maps.
66
- template <typename T, typename SV = SameValue <T>>
56
+ template <typename T, typename SV = SameValueVisitor <T>>
67
57
struct Entry
68
58
{
69
59
// / @brief Create an entry with a key and value
@@ -114,7 +104,7 @@ namespace mtconnect::entity {
114
104
bool sameValue (const Entry &other) const
115
105
{
116
106
const auto &ov = other.m_value ;
117
- return SV ()( m_value, ov);
107
+ return std::visit ( SV (m_value) , ov);
118
108
}
119
109
120
110
// / @brief compare a data entry ewith another
@@ -229,15 +219,8 @@ namespace mtconnect::entity {
229
219
230
220
};
231
221
232
- struct DataSetEntrySame {
233
- bool operator ()(const DataSetValue &v1, const DataSetValue &v2) const
234
- {
235
- return std::visit (DataSetValueSameVisitor (v1), v2);
236
- }
237
- };
238
-
239
222
// / @brief One entry in a data set. Has necessary interface to be work with maps.
240
- using DataSetEntry = data_set::Entry<DataSetValue, DataSetEntrySame >;
223
+ using DataSetEntry = data_set::Entry<DataSetValue, DataSetValueSameVisitor >;
241
224
242
225
// / @brief A set of data set entries
243
226
class DataSet : public data_set ::Set<DataSetEntry>
0 commit comments