blob: aa5a56ab8791171072cef990015baf4b5785d70f [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001let compiler decide on copy elision
2Fixes compiler errors with clang
3| ../../frame-2.5.0/src/x11/device_x11.cpp:126:13: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
4| std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
5| ^
6| ../../frame-2.5.0/src/x11/device_x11.cpp:126:13: note: remove std::move call here
7| std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
8| ^~~~~~~~~~ ~
9| 1 error generated.
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Upstream-Status: Pending
13
14Index: frame-2.5.0/src/x11/device_x11.cpp
15===================================================================
16--- frame-2.5.0.orig/src/x11/device_x11.cpp
17+++ frame-2.5.0/src/x11/device_x11.cpp
18@@ -122,8 +122,7 @@ UFDeviceX11::UFDeviceX11(Display* displa
19 UFAxis_* axis = new UFAxis(type, valuator_info->min, valuator_info->max,
20 valuator_info->resolution);
21
22- axes_[type] =
23- std::move(UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis)));
24+ axes_[type] = UniqueUFAxis(static_cast<oif::frame::UFAxis*>(axis));
25
26 axis_map_[valuator_info->number] = type;
27