mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 16:21:14 +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:
@@ -294,8 +294,8 @@ wxDataViewItem EditGCodeDialog::add_presets_placeholders()
|
||||
|
||||
|
||||
// Orca: create subgroups from the pages of the tabs
|
||||
auto init_from_tab = [this, full_config](wxDataViewItem parent, Tab* tab, const set<string>& preset_keys){
|
||||
set extra_keys(preset_keys);
|
||||
auto init_from_tab = [this, full_config](wxDataViewItem parent, Tab* tab, const std::set<std::string>& preset_keys){
|
||||
std::set extra_keys(preset_keys);
|
||||
for (const auto& page : tab->m_pages) {
|
||||
// ORCA: Pull icons from tabs for subgroups, icons are hidden on tabs
|
||||
std::string icon_name = "empty"; // use empty icon if not defined
|
||||
@@ -549,7 +549,7 @@ void ParamsNode::RefreshSearch(const wxString& search_text)
|
||||
|
||||
if (GetEnabledChildren().empty())
|
||||
if (auto pos = text.find(search_text); IsParamNode() && pos != wxString::npos) {
|
||||
m_highlight_index = make_unique<pair<int, int>>(pos, search_text.Len());
|
||||
m_highlight_index = make_unique<std::pair<int, int>>(pos, search_text.Len());
|
||||
Enable();
|
||||
} else {
|
||||
Disable();
|
||||
|
||||
Reference in New Issue
Block a user