Skip to content

Commit

Permalink
Fix iterator not in same container bug when compile with MSVC2019
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonVincii committed Mar 18, 2021
1 parent 279de34 commit be4cbdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/mavsdk_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ void MavsdkImpl::subscribe_on_new_system(Mavsdk::NewSystemCallback callback)
_new_system_callback = callback;

const auto is_any_system_connected = [this]() {
return std::any_of(systems().cbegin(), systems().cend(), [](auto& system) {
std::vector<std::shared_ptr<System>> connected_systems = systems();
return std::any_of(connected_systems.cbegin(), connected_systems.cend(), [](auto& system) {
return system->is_connected();
});
};
Expand Down

0 comments on commit be4cbdc

Please sign in to comment.