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:
HanifKoh
2026-10-07 14:58:49 +08:00
committed by GitHub
parent 1ec195a221
commit 6639a32b0c
36 changed files with 93 additions and 89 deletions
+1 -1
View File
@@ -368,7 +368,7 @@ wxString DeviceErrorDialog::parse_error_level(int error_code)
}
}
static const std::unordered_set<string> s_jump_liveview_error_codes = { "0300-8003", "0300-8002", "0300-800A"};
static const std::unordered_set<std::string> s_jump_liveview_error_codes = { "0300-8003", "0300-8002", "0300-800A"};
wxString DeviceErrorDialog::show_error_code(int error_code)
{
if (m_error_code == error_code) { return wxEmptyString;}