@@ -261,7 +261,7 @@ PlotStatus Plot(const char* label, const PlotConfig& conf) {
261261 uint32_t end = start;
262262 if (conf.selection .sanitize_fn )
263263 end = conf.selection .sanitize_fn (end - start) + start;
264- if (end < conf.values .offset + conf.values .count ) {
264+ if (static_cast < int >( end) < conf.values .offset + conf.values .count ) {
265265 *conf.selection .start = start;
266266 *conf.selection .length = end - start;
267267 status = PlotStatus::selection_updated;
@@ -277,7 +277,7 @@ PlotStatus Plot(const char* label, const PlotConfig& conf) {
277277 if (end > start) {
278278 if (conf.selection .sanitize_fn )
279279 end = conf.selection .sanitize_fn (end - start) + start;
280- if (end < conf.values .offset + conf.values .count ) {
280+ if (static_cast < int >( end) < conf.values .offset + conf.values .count ) {
281281 *conf.selection .length = end - start;
282282 status = PlotStatus::selection_updated;
283283 }
@@ -318,7 +318,7 @@ PlotStatus PlotVar(const char* label, const PlotVarConfig& conf, ImU32 color) {
318318 PlotVarData& pvd = g_PlotVarsMap[id];
319319
320320 // Setup
321- if (pvd.Data .capacity () != conf.buffer_size )
321+ if (pvd.Data .capacity () != static_cast < int >( conf.buffer_size ) )
322322 {
323323 pvd.Data .resize (conf.buffer_size );
324324 memset (&pvd.Data [0 ], 0 , sizeof (float ) * conf.buffer_size );
@@ -327,23 +327,18 @@ PlotStatus PlotVar(const char* label, const PlotVarConfig& conf, ImU32 color) {
327327 }
328328
329329 // Insert (avoid unnecessary modulo operator)
330- if (pvd.DataInsertIdx == conf.buffer_size )
330+ if (pvd.DataInsertIdx == static_cast < int >( conf.buffer_size ) )
331331 pvd.DataInsertIdx = 0 ;
332332 // int display_idx = pvd.DataInsertIdx;
333333 if (conf.value != FLT_MAX)
334334 pvd.Data [pvd.DataInsertIdx ++] = conf.value ;
335335
336336 // Draw
337337 int current_frame = ImGui::GetFrameCount ();
338- if (pvd.LastFrame != current_frame)
339- {
340- // char overlay[32];
341- // sprintf(overlay, "%-3.4f", pvd.Data[display_idx]);
338+ if (pvd.LastFrame != current_frame){
342339 ImGui::PushStyleColor (ImGuiCol_PlotLines, color);
343340 ImGui::PlotLines (" ##plot" , &pvd.Data [0 ], conf.buffer_size , pvd.DataInsertIdx , NULL , conf.scale .min , conf.scale .max , ImVec2 (conf.frame_size .x , conf.frame_size .y ));
344341 ImGui::PopStyleColor (1 );
345- // ImGui::SameLine();
346- // ImGui::Text("%s\n%-3.4f", label, pvd.Data[display_idx]); // Display last value in buffer
347342 pvd.LastFrame = current_frame;
348343
349344 status = PlotStatus::selection_updated;
0 commit comments