From 5dfff4ddc4cf788f3bb720a644a43c9a4fa05549 Mon Sep 17 00:00:00 2001 From: Olga Khlopkova Date: Tue, 10 Nov 2020 10:10:18 +0300 Subject: [PATCH] [qt] Fix for ignoring function's val with 'warn_unused_result' --- qt/routing_settings_dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qt/routing_settings_dialog.cpp b/qt/routing_settings_dialog.cpp index 6a780f04a6..90265b6f7a 100644 --- a/qt/routing_settings_dialog.cpp +++ b/qt/routing_settings_dialog.cpp @@ -32,8 +32,10 @@ std::string const RoutingSettings::kRouterTypeCachedSettings = "router_type_desk bool RoutingSettings::TurnsEnabled() { bool enabled = false; - settings::Get(kShowTurnsSettings, enabled); - return enabled; + if (settings::Get(kShowTurnsSettings, enabled)) + return enable; + + return false; } // static