From a502de9e81171c8d6eabbc43eab3f00d4c1189b2 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Thu, 18 Aug 2022 17:39:08 +0200 Subject: [PATCH] FGPUIMenuBar: small optimization (requires C++17) --- src/GUI/FGPUIMenuBar.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/GUI/FGPUIMenuBar.cxx b/src/GUI/FGPUIMenuBar.cxx index 9b4897fe8..9a43119a4 100755 --- a/src/GUI/FGPUIMenuBar.cxx +++ b/src/GUI/FGPUIMenuBar.cxx @@ -210,8 +210,7 @@ FGPUIMenuBar::make_menu (SGPropertyNode * node) callbacks[j] = menu_callback; // Add an element (vector) that will contain all bindings assigned // to the menu entry. - _bindings.emplace_front(); - auto& bindingsVec = _bindings.front(); + auto& bindingsVec = _bindings.emplace_front(); userdata[j] = &bindingsVec; // Load all the bindings for this item