Change "pretending to be for loop" while loop to for loop
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Inferno {
|
|||||||
// -----------
|
// -----------
|
||||||
// 0b100000000 256
|
// 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);
|
size_t newCapacity = (m_count + bytes + BUFFER_SIZE - 1) & ~(BUFFER_SIZE - 1);
|
||||||
|
|
||||||
unsigned char* newBuffer = static_cast<unsigned char*>(malloc(newCapacity));
|
unsigned char* newBuffer = static_cast<unsigned char*>(malloc(newCapacity));
|
||||||
|
|||||||
@@ -205,16 +205,13 @@ namespace Inferno {
|
|||||||
{
|
{
|
||||||
std::string_view view { format };
|
std::string_view view { format };
|
||||||
|
|
||||||
uint32_t i = 0;
|
for(uint32_t i = 0; format[i] != '\0'; i++) {
|
||||||
while(format[i] != '\0') {
|
|
||||||
|
|
||||||
if (format[i] == '{' && format[i + 1] == '}') {
|
if (format[i] == '{' && format[i + 1] == '}') {
|
||||||
DebugLogStream(type, false) << view.substr(0, i) << value;
|
DebugLogStream(type, false) << view.substr(0, i) << value;
|
||||||
dbgln(type, newline, format + i + 2, parameters...);
|
dbgln(type, newline, format + i + 2, parameters...);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user