From aed13bb9a91cfc8e67556643d4091131c52ea3e5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Jan 2021 19:25:53 +0100 Subject: [PATCH] Remove unnecessary temporary variable in wxRibbonToolBar Just return the wxRect directly. No real changes. --- src/ribbon/toolbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ribbon/toolbar.cpp b/src/ribbon/toolbar.cpp index 3ce8b33b77..2002fe1bc5 100644 --- a/src/ribbon/toolbar.cpp +++ b/src/ribbon/toolbar.cpp @@ -535,8 +535,7 @@ wxRect wxRibbonToolBar::GetToolRect(int tool_id)const wxRibbonToolBarToolBase* tool = group->tools.Item(t); if (tool->id == tool_id) { - wxRect rect(tool->position + group->position, tool->size); - return rect; + return wxRect(tool->position + group->position, tool->size); } ++pos; }