mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 00:01:09 +00:00
Remove using namespace std from json_diff.hpp (#16222)
The directive sat at global scope in a header that DeviceManager.hpp includes, so most of the GUI compiled with all of std in the global namespace. 42 files had come to rely on it, mostly for string, vector and unordered_map, four of them for the ""sv and ""ms literals. Those sites are qualified. GCodeViewer.cpp spelled the type as std::vector<::string>, which only resolved through the directive. The files that use the ""sv and ""ms literals get a file-scope "using namespace std::string_view_literals;" or "using namespace std::chrono_literals;", as other sources already do.
This commit is contained in:
@@ -94,6 +94,8 @@
|
||||
#include "slic3r/GUI/Gizmos/GizmoObjectManipulation.hpp"
|
||||
#include "slic3r/GUI/PartPlate.hpp"
|
||||
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
namespace Slic3r { class PrintBase; }
|
||||
|
||||
|
||||
@@ -3184,7 +3186,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
float ams_item_height = 0;
|
||||
float filament_group_item_align_width = 0;
|
||||
{
|
||||
float three_words_width = imgui.calc_text_size(std::string_view("ABC")).x;
|
||||
float three_words_width = imgui.calc_text_size("ABC"sv).x;
|
||||
const int line_capacity = 4;
|
||||
|
||||
for (const auto& extruder_filaments : {m_left_extruder_filament,m_right_extruder_filament })
|
||||
|
||||
Reference in New Issue
Block a user