Skip to content

Commit 348831a

Browse files
committed
gui: dont use std::move with const &
Signed-off-by: Peter Gadfort <[email protected]>
1 parent be6d32d commit 348831a

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/gui/include/gui/gui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class Descriptor
300300
virtual std::string getName(const std::any& object) const = 0;
301301
virtual std::string getShortName(const std::any& object) const
302302
{
303-
return getName(std::move(object));
303+
return getName(object);
304304
}
305305
virtual std::string getTypeName() const = 0;
306306
virtual std::string getTypeName(const std::any& /* object */) const

src/gui/src/dbDescriptors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ void DbBlockageDescriptor::highlight(const std::any& object,
26162616
Painter& painter) const
26172617
{
26182618
odb::Rect rect;
2619-
getBBox(std::move(object), rect);
2619+
getBBox(object, rect);
26202620
painter.drawRect(rect);
26212621
}
26222622

@@ -2733,7 +2733,7 @@ void DbObstructionDescriptor::highlight(const std::any& object,
27332733
Painter& painter) const
27342734
{
27352735
odb::Rect rect;
2736-
getBBox(std::move(object), rect);
2736+
getBBox(object, rect);
27372737
painter.drawRect(rect);
27382738
}
27392739

src/gui/src/gui.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ std::string Gui::addLabel(int x,
406406
std::optional<Painter::Anchor> anchor,
407407
const std::optional<std::string>& name)
408408
{
409-
return main_window->addLabel(
410-
x, y, text, color, size, anchor, std::move(name));
409+
return main_window->addLabel(x, y, text, color, size, anchor, name);
411410
}
412411

413412
void Gui::deleteLabel(const std::string& name)

src/gui/src/layoutViewer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,8 +2489,8 @@ LayoutScroll::LayoutScroll(
24892489
const std::function<int()>& arrow_keys_scroll_step,
24902490
QWidget* parent)
24912491
: QScrollArea(parent),
2492-
default_mouse_wheel_zoom_(std::move(default_mouse_wheel_zoom)),
2493-
arrow_keys_scroll_step_(std::move(arrow_keys_scroll_step)),
2492+
default_mouse_wheel_zoom_(default_mouse_wheel_zoom),
2493+
arrow_keys_scroll_step_(arrow_keys_scroll_step),
24942494
viewer_(viewer),
24952495
scrolling_with_cursor_(false)
24962496
{

0 commit comments

Comments
 (0)