@@ -56,7 +56,7 @@ class IteratorOverFileOfPersistedEntries {
56
56
public:
57
57
explicit IteratorOverFileOfPersistedEntries (std::istream& fi, std::streampos offset, uint64_t index_at_offset)
58
58
: fi_(fi), next_(index_at_offset, std::chrono::microseconds(0 )) {
59
- assert (!fi_.bad ());
59
+ CURRENT_ASSERT (!fi_.bad ());
60
60
if (offset) {
61
61
fi_.seekg (offset, std::ios_base::beg);
62
62
}
@@ -152,8 +152,8 @@ class FilePersister {
152
152
std::streampos current_offset (0 );
153
153
while (cit.ProcessNextEntry (
154
154
[&fi, &offset, ×tamp, ¤t_offset](const idxts_t & current, const char *) {
155
- assert (current.index == offset.size ());
156
- assert (current.index == timestamp.size ());
155
+ CURRENT_ASSERT (current.index == offset.size ());
156
+ CURRENT_ASSERT (current.index == timestamp.size ());
157
157
offset.push_back (current_offset);
158
158
timestamp.push_back (current.us );
159
159
current_offset = fi.tellg ();
@@ -312,8 +312,8 @@ class FilePersister {
312
312
const auto current = idxts_t (iterator.index , iterator.us );
313
313
{
314
314
std::lock_guard<std::mutex> lock (file_persister_impl_->mutex );
315
- assert (file_persister_impl_->offset .size () == iterator.index );
316
- assert (file_persister_impl_->timestamp .size () == iterator.index );
315
+ CURRENT_ASSERT (file_persister_impl_->offset .size () == iterator.index );
316
+ CURRENT_ASSERT (file_persister_impl_->timestamp .size () == iterator.index );
317
317
file_persister_impl_->offset .push_back (file_persister_impl_->appender .tellp ());
318
318
file_persister_impl_->timestamp .push_back (timestamp);
319
319
}
@@ -377,8 +377,8 @@ class FilePersister {
377
377
CURRENT_THROW (InvalidIterableRangeException ());
378
378
}
379
379
std::lock_guard<std::mutex> lock (file_persister_impl_->mutex );
380
- assert (file_persister_impl_->offset .size () >=
381
- current_size); // "Greater" is OK, `Iterate()` is multithreaded. -- D.K.
380
+ CURRENT_ASSERT (file_persister_impl_->offset .size () >=
381
+ current_size); // "Greater" is OK, `Iterate()` is multithreaded. -- D.K.
382
382
return IterableRange (
383
383
file_persister_impl_, begin_index, end_index, file_persister_impl_->offset [begin_index]);
384
384
}
0 commit comments