diff --git a/inferno/src/inferno/io/log.cpp b/inferno/src/inferno/io/log.cpp index b44df33..a927cff 100644 --- a/inferno/src/inferno/io/log.cpp +++ b/inferno/src/inferno/io/log.cpp @@ -29,7 +29,7 @@ namespace Inferno { // ----------- // 0b100000000 256 - // Buffer is is chunks of 128 bytes + // Buffer is increased in chunks of 128 bytes size_t newCapacity = (m_count + bytes + BUFFER_SIZE - 1) & ~(BUFFER_SIZE - 1); unsigned char* newBuffer = static_cast(malloc(newCapacity)); diff --git a/inferno/src/inferno/io/log.h b/inferno/src/inferno/io/log.h index bd7ef21..2cfd978 100644 --- a/inferno/src/inferno/io/log.h +++ b/inferno/src/inferno/io/log.h @@ -205,16 +205,13 @@ namespace Inferno { { std::string_view view { format }; - uint32_t i = 0; - while(format[i] != '\0') { + for(uint32_t i = 0; format[i] != '\0'; i++) { if (format[i] == '{' && format[i + 1] == '}') { DebugLogStream(type, false) << view.substr(0, i) << value; dbgln(type, newline, format + i + 2, parameters...); return; } - - i++; } }