@@ -267,8 +267,11 @@ namespace osmium {
267
267
/* *
268
268
* Remove the entry with the specified member_id and relation_id
269
269
* from the database. If the entry doesn't exist, nothing happens.
270
+ *
271
+ * @pre You have to call prepare_for_lookup() before using this.
270
272
*/
271
273
void remove (osmium::object_id_type member_id, osmium::object_id_type relation_id) {
274
+ assert (!m_init_phase && " Call MembersDatabase::prepare_for_lookup() before calling remove()." );
272
275
const auto range = find (member_id);
273
276
274
277
if (range.empty ()) {
@@ -294,6 +297,8 @@ namespace osmium {
294
297
* return a pointer to it. Returns nullptr if there is no object
295
298
* with that id in the database.
296
299
*
300
+ * @pre You have to call prepare_for_lookup() before using this.
301
+ *
297
302
* Complexity: Logarithmic in the number of members tracked (as
298
303
* returned by size()).
299
304
*/
@@ -354,6 +359,7 @@ namespace osmium {
354
359
* as a parameter.
355
360
* @returns true if the object was actually added, false if no
356
361
* relation needed this object.
362
+ * @pre You have to call prepare_for_lookup() before using this.
357
363
*/
358
364
template <typename TFunc>
359
365
bool add (const TObject& object, TFunc&& func) {
@@ -390,6 +396,8 @@ namespace osmium {
390
396
* return a pointer to it. Returns nullptr if there is no object
391
397
* with that id in the database.
392
398
*
399
+ * @pre You have to call prepare_for_lookup() before using this.
400
+ *
393
401
* Complexity: Logarithmic in the number of members tracked (as
394
402
* returned by size()).
395
403
*/
0 commit comments