Fix compatibility with GCC 4.8

Closes #2045
This commit is contained in:
Benoit Blanchon
2024-02-01 21:37:45 +01:00
parent c98b05e207
commit 72642e3090
9 changed files with 50 additions and 9 deletions

View File

@ -90,6 +90,10 @@ class AllocatorLog {
append(entry);
}
void clear() {
log_.str("");
}
void append(const AllocatorLogEntry& entry) {
for (size_t i = 0; i < entry.count(); i++)
log_ << entry.str() << "\n";
@ -165,7 +169,7 @@ class SpyingAllocator : public ArduinoJson::Allocator {
}
void clearLog() {
log_ = AllocatorLog();
log_.clear();
}
const AllocatorLog& log() const {