A few small refactorings
This commit is contained in:
parent
578b80e12c
commit
a9465ddedc
4 changed files with 19 additions and 20 deletions
src/slic3r/GUI
|
@ -4629,14 +4629,14 @@ void GCodeViewer::render_statistics()
|
|||
|
||||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
|
||||
auto add_time = [this, &imgui](const std::string& label, int64_t time) {
|
||||
auto add_time = [&imgui](const std::string& label, int64_t time) {
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, label);
|
||||
ImGui::SameLine(offset);
|
||||
imgui.text(std::to_string(time) + " ms (" + get_time_dhms(static_cast<float>(time) * 0.001f) + ")");
|
||||
};
|
||||
|
||||
auto add_memory = [this, &imgui](const std::string& label, int64_t memory) {
|
||||
auto format_string = [memory](const std::string& units, float value) {
|
||||
auto add_memory = [&imgui](const std::string& label, int64_t memory) {
|
||||
auto format_string = [memory](const std::string& units, float value) {
|
||||
return std::to_string(memory) + " bytes (" +
|
||||
Slic3r::float_to_string_decimal_point(float(memory) * value, 3)
|
||||
+ " " + units + ")";
|
||||
|
@ -4658,7 +4658,7 @@ void GCodeViewer::render_statistics()
|
|||
imgui.text(format_string("GB", inv_gb));
|
||||
};
|
||||
|
||||
auto add_counter = [this, &imgui](const std::string& label, int64_t counter) {
|
||||
auto add_counter = [&imgui](const std::string& label, int64_t counter) {
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, label);
|
||||
ImGui::SameLine(offset);
|
||||
imgui.text(std::to_string(counter));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue