Skip to content

Commit

Permalink
Fix failed builds...again
Browse files Browse the repository at this point in the history
  • Loading branch information
cochcoder committed Mar 12, 2024
1 parent 46b2922 commit 3d92a5a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/slic3r/GUI/GCodeViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4322,7 +4322,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
imgui.text(_u8L("Filament cost") + ":");
ImGui::SameLine();
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), filament_cost_all_plates);
std::sprintf(buf, "%s%.2f", currency.c_str(), filament_cost_all_plates);
imgui.text(buf);
}

Expand All @@ -4332,7 +4332,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
imgui.text(_u8L("Electric cost") + ":");
ImGui::SameLine();
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), electric_cost_all_plates);
std::sprintf(buf, "%s%.2f", currency.c_str(), electric_cost_all_plates);
imgui.text(buf);
}

Expand All @@ -4342,7 +4342,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
imgui.text(_u8L("Other costs") + ":");
ImGui::SameLine();
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), other_costs_all_plates);
std::sprintf(buf, "%s%.2f", currency.c_str(), other_costs_all_plates);
imgui.text(buf);
}

Expand All @@ -4352,7 +4352,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
imgui.text(_u8L("Total cost") + ":");
ImGui::SameLine();
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), total_cost_all_plates);
std::sprintf(buf, "%s%.2f", currency.c_str(), total_cost_all_plates);
imgui.text(buf);
}
}
Expand Down Expand Up @@ -5135,7 +5135,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
ImGui::SameLine();
imgui.text(_u8L("Filament cost")+":");
ImGui::SameLine();
::sprintf(buf, "%.2f", currency.c_str(), ps.total_filament_cost);
std::sprintf(buf, "%s%.2f", currency.c_str(), ps.total_filament_cost);
imgui.text(buf);
}

Expand Down Expand Up @@ -5608,7 +5608,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
imgui.text(cost_filament+":");
ImGui::SameLine(max_len);
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), ps.total_filament_cost);
std::sprintf(buf, "%s%.2f", currency.c_str(), ps.total_filament_cost);
imgui.text(buf);
}

Expand All @@ -5619,18 +5619,18 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
imgui.text(cost_energy+":");
ImGui::SameLine(max_len);
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), ps.electric_cost);
std::sprintf(buf, "%s%.2f", currency.c_str(), ps.electric_cost);
imgui.text(buf);
}

//BBS: display other costs, if any costs are caculated
if (ps.electric_cost > 0) {
if (ps.other_costs > 0) {
ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine();
imgui.text(other_costs+":");
ImGui::SameLine(max_len);
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), ps.other_costs);
std::sprintf(buf, "%s%.2f", currency.c_str(), ps.other_costs);;
imgui.text(buf);
}

Expand All @@ -5641,7 +5641,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
imgui.text(total_cost+":");
ImGui::SameLine(max_len);
char buf[64];
::sprintf(buf, "%.2f", currency.c_str(), ps.total_cost);
std::sprintf(buf, "%s%.2f", currency.c_str(), ps.total_cost);
imgui.text(buf);
}
}
Expand Down

0 comments on commit 3d92a5a

Please sign in to comment.