ImGuiTextBuffer: Renamed append() helper to appendf(), appendv() to appendfv(). Added reserve().

This commit is contained in:
omar
2017-11-27 16:55:06 +01:00
parent 0f955b818d
commit 532f564fd3
3 changed files with 10 additions and 8 deletions

View File

@ -2707,7 +2707,7 @@ struct ExampleAppLog
int old_size = Buf.size();
va_list args;
va_start(args, fmt);
Buf.appendv(fmt, args);
Buf.appendfv(fmt, args);
va_end(args);
for (int new_size = Buf.size(); old_size < new_size; old_size++)
if (Buf[old_size] == '\n')
@ -2911,7 +2911,7 @@ static void ShowExampleAppLongText(bool* p_open)
if (ImGui::Button("Add 1000 lines"))
{
for (int i = 0; i < 1000; i++)
log.append("%i The quick brown fox jumps over the lazy dog\n", lines+i);
log.appendf("%i The quick brown fox jumps over the lazy dog\n", lines+i);
lines += 1000;
}
ImGui::BeginChild("Log");