Skip to content

Commit

Permalink
Merge pull request #122 from sphaero/winfixes
Browse files Browse the repository at this point in the history
windows errors on c++17 for loop, revert to oldschool loop
  • Loading branch information
Machiel Veltkamp authored May 29, 2020
2 parents dad6484 + 80d50c4 commit 7b65dc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ void ofApp::setup()

//fill the interface list
auto niclist = listNetworkInterfaces( ANY, NetworkInterface::IPv4_ONLY );
for (const auto& interface: niclist )
auto itr = niclist.begin();
while ( itr != niclist.end() )
{
iface_list.push_back( interface.name() );
iface_list.push_back( itr->name() );
*itr++;
}
// and set the current iface to last found (first is probably lo)
current_iface_idx = iface_list.size() - 1;
Expand Down

0 comments on commit 7b65dc5

Please sign in to comment.