1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-10-09 15:47:26 -04:00

fix compiler warning in demo

This commit is contained in:
epezent 2020-09-01 08:22:49 -05:00
parent b74accfb59
commit 4a584bad40
2 changed files with 3 additions and 3 deletions

View File

@ -1048,7 +1048,7 @@ void ShowDemoWindow(bool* p_open) {
ImGui::BulletText("You can implement legend context menus to inject per-item controls and widgets."); ImGui::BulletText("You can implement legend context menus to inject per-item controls and widgets.");
ImGui::BulletText("Right click the legend label/icon to edit custom item attributes."); ImGui::BulletText("Right click the legend label/icon to edit custom item attributes.");
static float frequency = 0.1; static float frequency = 0.1f;
static float amplitude = 0.5f; static float amplitude = 0.5f;
static ImVec4 color = ImVec4(1,1,0,1); static ImVec4 color = ImVec4(1,1,0,1);
static float alpha = 1.0f; static float alpha = 1.0f;

View File

@ -105,7 +105,7 @@ void BustItemCache() {
} }
// Begins a new item. Returns false if the item should not be plotted. // Begins a new item. Returns false if the item should not be plotted.
bool BeginItem(const char* label_id, ImPlotCol recolor_from) { inline bool BeginItem(const char* label_id, ImPlotCol recolor_from) {
ImPlotContext& gp = *GImPlot; ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != NULL, "PlotX() needs to be called between BeginPlot() and EndPlot()!"); IM_ASSERT_USER_ERROR(gp.CurrentPlot != NULL, "PlotX() needs to be called between BeginPlot() and EndPlot()!");
ImPlotItem* item = RegisterOrGetItem(label_id); ImPlotItem* item = RegisterOrGetItem(label_id);
@ -162,7 +162,7 @@ bool BeginItem(const char* label_id, ImPlotCol recolor_from) {
} }
// Ends an item (call only if BeginItem returns true) // Ends an item (call only if BeginItem returns true)
void EndItem() { inline void EndItem() {
ImPlotContext& gp = *GImPlot; ImPlotContext& gp = *GImPlot;
// pop rendering clip rect // pop rendering clip rect
PopPlotClipRect(); PopPlotClipRect();