1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-13 22:48:50 -05:00

fix GetColormapSize

This commit is contained in:
Evan Pezent 2021-06-06 17:42:00 -07:00
parent da1bf57136
commit 4edb1c75b6

View File

@ -3389,7 +3389,7 @@ int GetColormapSize(ImPlotColormap cmap) {
ImPlotContext& gp = *GImPlot; ImPlotContext& gp = *GImPlot;
cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap;
IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
return gp.ColormapData.GetKeyCount(gp.Style.Colormap); return gp.ColormapData.GetKeyCount(cmap);
} }
ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) { ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) {