From f6482a4657471804abcf26aab95f5de8b3cff98f Mon Sep 17 00:00:00 2001 From: Nir Azkiel Date: Wed, 17 Apr 2024 21:37:03 +0300 Subject: [PATCH] reverse order of sensor open --- src/pipeline/resolver.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pipeline/resolver.h b/src/pipeline/resolver.h index b5a6b58721..6208869456 100644 --- a/src/pipeline/resolver.h +++ b/src/pipeline/resolver.h @@ -136,9 +136,10 @@ namespace librealsense void open() { - for (auto && kvp : _dev_to_profiles) { - auto&& sub = _results.at(kvp.first); - sub->open(kvp.second); + std::map::reverse_iterator it; + for (it = _dev_to_profiles.rbegin(); it != _dev_to_profiles.rend(); it++) { + auto&& sub = _results.at(it->first); + sub->open(it->second); } }