@@ -200,7 +200,7 @@ bool String::reserve(unsigned int size) {
200
200
#ifdef DEBUG_ESP_PORT
201
201
static void identifyString (const String& badOne)
202
202
{
203
- DEBUGV (" [String] '%." STR (OOM_STRING_BORDER_DISPLAY) " s ... %." STR (OOM_STRING_BORDER_DISPLAY) " s': " ,
203
+ DEBUG_ESP_PORT. printf (" [String] '%." STR (OOM_STRING_BORDER_DISPLAY) " s ... %." STR (OOM_STRING_BORDER_DISPLAY) " s': " ,
204
204
badOne.c_str (),
205
205
badOne.length () > OOM_STRING_BORDER_DISPLAY? badOne.c_str () + std::max ((int )badOne.length () - OOM_STRING_BORDER_DISPLAY, OOM_STRING_BORDER_DISPLAY): " " );
206
206
}
@@ -231,14 +231,14 @@ bool String::changeBuffer(unsigned int maxStrLen) {
231
231
if (!isSSO () && capacity () >= OOM_STRING_THRESHOLD_REALLOC_WARN && maxStrLen > capacity ()) {
232
232
// warn when badly re-allocating
233
233
identifyString (*this );
234
- DEBUGV (" Reallocating large String(%d -> %d bytes)\n " , len (), maxStrLen);
234
+ DEBUG_ESP_PORT. printf (" Reallocating large String(%d -> %d bytes)\n " , len (), maxStrLen);
235
235
}
236
236
#endif
237
237
// Make sure we can fit newsize in the buffer
238
238
if (newSize > CAPACITY_MAX) {
239
239
#ifdef DEBUG_ESP_PORT
240
240
identifyString (*this );
241
- DEBUGV (" Maximum capacity reached (" STR (CAPACITY_MAX) " )\n " );
241
+ DEBUG_ESP_PORT. printf (" Maximum capacity reached (" STR (CAPACITY_MAX) " )\n " );
242
242
#endif
243
243
return false ;
244
244
}
@@ -261,7 +261,7 @@ bool String::changeBuffer(unsigned int maxStrLen) {
261
261
}
262
262
#ifdef DEBUG_ESP_PORT
263
263
identifyString (*this );
264
- DEBUGV (" OOM: %d -> %d bytes\n " , isSSO () ? 0 : capacity (), newSize);
264
+ DEBUG_ESP_PORT. printf (" OOM: %d -> %zu bytes\n " , isSSO () ? 0 : capacity (), newSize);
265
265
#endif
266
266
return false ;
267
267
}
0 commit comments