diff --git a/public/raid/imraid.hpp b/public/raid/imraid.hpp index a59edb5..98981f1 100644 --- a/public/raid/imraid.hpp +++ b/public/raid/imraid.hpp @@ -73,7 +73,7 @@ struct DataTableColumn using renderer_t = std::function; using comparator_t = std::function; - std::string header; + const char* header; renderer_t renderer; comparator_t comparator; }; @@ -85,7 +85,7 @@ struct DataTableOptions ImGuiTableFlags tableFlags = ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Sortable | ImGuiTableFlags_ScrollY; }; -template +template inline void DataTable(const char* strId, const DataTableOptions& options, const TData& data, DataTableState& state, ImVec2 outerSize = {}) { if (outerSize.y <= 0.f) { @@ -103,7 +103,7 @@ inline void DataTable(const char* strId, const DataTableOptions& option if (!column.comparator) { flags |= ImGuiTableColumnFlags_NoSort; } - ImGui::TableSetupColumn(column.header.c_str(), flags); + ImGui::TableSetupColumn(column.header, flags); } ImGui::TableSetupScrollFreeze(0, 1); ImGui::TableHeadersRow();