ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings.

This commit is contained in:
ocornut
2021-03-31 15:06:32 +02:00
committed by ocornut
parent 0d2f32c8fb
commit dd7b5ceff9
5 changed files with 67 additions and 61 deletions

View File

@@ -1705,8 +1705,8 @@ void ImGui::TableSetupColumn(ImStrv label, ImGuiTableColumnFlags flags, float in
{
char zero_terminator = 0;
column->NameOffset = (ImS16)table->ColumnsNames.size();
table->ColumnsNames.append(label.Begin, label.End);
table->ColumnsNames.append(&zero_terminator, &zero_terminator + 1);
table->ColumnsNames.append(label);
table->ColumnsNames.append(ImStrv(&zero_terminator, &zero_terminator + 1));
}
}
@@ -3197,8 +3197,8 @@ void ImGui::TableHeader(ImStrv label)
if (!label)
label = "";
ImGuiID id = window->GetID(label);
ImStrv label_for_display(label.Begin, FindRenderedTextEnd(label));
ImVec2 label_size = CalcTextSize(label_for_display, false);
const ImStrv label_for_display(label.Begin, FindRenderedTextEnd(label));
const ImVec2 label_size = CalcTextSize(label_for_display, false);
ImVec2 label_pos = window->DC.CursorPos;
// If we already got a row height, there's use that.