Skip to content

Commit 870fffc

Browse files
committed
Walkable: Avoid define on 'realloc'
1 parent 3a5731e commit 870fffc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/DynamicBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class Walkable
217217

218218
// Resize the underlying buffer storage, preserving contents
219219
// Returns new size on success, current size on failure.
220-
size_t realloc(size_t s) {
220+
size_t reallocate(size_t s) {
221221
if (s <= size()) {
222222
auto new_buf = buffer_type(data(), s);
223223
if (new_buf) {

src/WebResponses.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,17 +369,17 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest *request, size_t len, u
369369
do {
370370
dealloc_vector(_packet);
371371
outLen = std::min(outLen, max_block_size);
372-
_packet.realloc(outLen);
372+
_packet.reallocate(outLen);
373373
max_block_size = ESP.getMaxFreeBlockSize() - 128;
374374
DEBUG_PRINTFP("(%d) Checking %d vs %d\n", (intptr_t)this, outLen, max_block_size);
375375
} while (max_block_size < outLen);
376376
} else {
377-
_packet.realloc(outLen);
377+
_packet.reallocate(outLen);
378378
}
379379
}
380380
#else
381381
//Serial.printf("[%u] %d/%d -> %d\n", (unsigned) millis(), ESP.getMaxAllocHeap(), ESP.getFreeHeap(), outLen);
382-
_packet.realloc(outLen);
382+
_packet.reallocate(outLen);
383383
#endif
384384

385385
if(_chunked){

0 commit comments

Comments
 (0)