mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 15:51:08 +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:
@@ -110,6 +110,7 @@ using json = nlohmann::json;
|
||||
class wxWindow;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
#define CALI_DEBUG
|
||||
#define MINUTE_30 1800000 //ms
|
||||
@@ -3103,7 +3104,7 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
|
||||
DevFirmwareVersionInfo ver_info;
|
||||
ver_info.name = (*it)["name"].get<std::string>();
|
||||
if ((*it).contains("product_name"))
|
||||
ver_info.product_name = wxString::FromUTF8((*it)["product_name"].get<string>());
|
||||
ver_info.product_name = wxString::FromUTF8((*it)["product_name"].get<std::string>());
|
||||
if ((*it).contains("sw_ver"))
|
||||
ver_info.sw_ver = (*it)["sw_ver"].get<std::string>();
|
||||
if ((*it).contains("sw_new_ver"))
|
||||
|
||||
Reference in New Issue
Block a user