@@ -89,73 +89,10 @@ class value_sett
89
89
// / offsets (`offsett` instances). This is the RHS set of a single row of
90
90
// / the enclosing `value_sett`, such as `{ null, dynamic_object1 }`.
91
91
// / The set is represented as a map from numbered `exprt`s to `offsett`
92
- // / instead of a set of pairs to make lookup by `exprt` easier. All
93
- // / methods matching the interface of `std::map` forward those methods
94
- // / to the internal map.
95
- class object_map_dt
96
- {
97
- typedef std::map<object_numberingt::number_type, offsett> data_typet;
98
- data_typet data;
99
-
100
- public:
101
- // NOLINTNEXTLINE(readability/identifiers)
102
- typedef data_typet::iterator iterator;
103
- // NOLINTNEXTLINE(readability/identifiers)
104
- typedef data_typet::const_iterator const_iterator;
105
- // NOLINTNEXTLINE(readability/identifiers)
106
- typedef data_typet::value_type value_type;
107
- // NOLINTNEXTLINE(readability/identifiers)
108
- typedef data_typet::key_type key_type;
109
-
110
- iterator begin () { return data.begin (); }
111
- const_iterator begin () const { return data.begin (); }
112
- const_iterator cbegin () const { return data.cbegin (); }
113
-
114
- iterator end () { return data.end (); }
115
- const_iterator end () const { return data.end (); }
116
- const_iterator cend () const { return data.cend (); }
117
-
118
- size_t size () const { return data.size (); }
119
- bool empty () const { return data.empty (); }
120
-
121
- void erase (key_type i) { data.erase (i); }
122
- void erase (const_iterator it) { data.erase (it); }
123
-
124
- offsett &operator [](key_type i)
125
- {
126
- return data[i];
127
- }
128
- offsett &at (key_type i)
129
- {
130
- return data.at (i);
131
- }
132
- const offsett &at (key_type i) const
133
- {
134
- return data.at (i);
135
- }
136
-
137
- template <typename It>
138
- void insert (It b, It e) { data.insert (b, e); }
139
-
140
- template <typename T>
141
- const_iterator find (T &&t) const { return data.find (std::forward<T>(t)); }
92
+ // / instead of a set of pairs to make lookup by `exprt` easier.
93
+ using object_map_dt = std::map<object_numberingt::number_type, offsett>;
142
94
143
- static const object_map_dt blank;
144
-
145
- object_map_dt ()=default ;
146
-
147
- bool operator ==(const object_map_dt &other) const
148
- {
149
- return data==other.data ;
150
- }
151
- bool operator !=(const object_map_dt &other) const
152
- {
153
- return !(*this ==other);
154
- }
155
-
156
- protected:
157
- ~object_map_dt ()=default ;
158
- };
95
+ static const object_map_dt blank_object_map;
159
96
160
97
// / Converts an `object_map_dt` element `object_number -> offset` into an
161
98
// / `object_descriptor_exprt` with
@@ -175,7 +112,7 @@ class value_sett
175
112
// /
176
113
// / Then the set { dynamic_object1 }, represented by an `object_map_dt`, can
177
114
// / be shared between the two `value_sett` instances.
178
- typedef reference_counting<object_map_dt> object_mapt ;
115
+ using object_mapt = reference_counting<object_map_dt, blank_object_map> ;
179
116
180
117
// / Sets an element in object map `dest` to match an existing element `it`
181
118
// / from a different map. Any existing element for the same `exprt` is
0 commit comments