summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-12 00:21:07 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-12 00:21:07 -0500
commit28d1087c28391c0476c64ccbf2db3d9e851fb270 (patch)
tree3895e9d223d4484be334d058a0daa7ac185186f2
parentc8ce27ee8190cd56a1faf48fca98a0a2b8d9186f (diff)
downloadhorizon-qt5-master.tar.gz
horizon-qt5-master.tar.bz2
horizon-qt5-master.tar.xz
horizon-qt5-master.zip
Use any_of for determining WLAN presenceHEADmaster
-rw-r--r--networkingpage.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/networkingpage.cc b/networkingpage.cc
index e78a8f8..96903e8 100644
--- a/networkingpage.cc
+++ b/networkingpage.cc
@@ -63,18 +63,9 @@ int NetworkingPage::nextId() const
{
if(radioGroup->checkedButton() == simple)
{
- bool tryWireless = false;
-
- for(auto &iface : this->horizonWizard()->interfaces)
- {
- if(iface.is_wireless())
- {
- tryWireless = true;
- break;
- }
- }
-
- if(tryWireless)
+ if(std::any_of(this->horizonWizard()->interfaces.begin(),
+ this->horizonWizard()->interfaces.end(),
+ [=](Horizon::NetworkInterface &iface) { return iface.is_wireless(); }))
{
return HorizonWizard::Page_Network_SimpleWireless;
}