mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Fix clazy warning
reference instead of copy
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ void UI_combobox::from_json(const json &j)
|
|||||||
if (j.contains("options"))
|
if (j.contains("options"))
|
||||||
{
|
{
|
||||||
this->m_options.clear();
|
this->m_options.clear();
|
||||||
for (auto option : j["options"])
|
for (auto &option : j["options"])
|
||||||
{
|
{
|
||||||
this->m_options.push_back(option);
|
this->m_options.push_back(option);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ void UI_tab_widget::from_json(const json &j)
|
|||||||
if (j.contains("tab_names"))
|
if (j.contains("tab_names"))
|
||||||
{
|
{
|
||||||
this->m_tab_names.clear();
|
this->m_tab_names.clear();
|
||||||
for (auto option : j["tab_names"])
|
for (auto &option : j["tab_names"])
|
||||||
{
|
{
|
||||||
this->m_tab_names.push_back(option);
|
this->m_tab_names.push_back(option);
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ void UI_tab_widget::from_json(const json &j)
|
|||||||
if (j.contains("tab_visible"))
|
if (j.contains("tab_visible"))
|
||||||
{
|
{
|
||||||
this->m_tab_visible.clear();
|
this->m_tab_visible.clear();
|
||||||
for (auto option : j["tab_visible"])
|
for (auto &option : j["tab_visible"])
|
||||||
{
|
{
|
||||||
this->m_tab_visible.push_back(option);
|
this->m_tab_visible.push_back(option);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user