From 63e922f6377812bf5a8435a7bb847515b01322b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Mon, 1 Feb 2021 12:34:34 +0100 Subject: [PATCH] Bytecode: port some constructors to pass-by-value using C++11 move semantics Performed using modernize-pass-by-value from clang-tidy. https://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html --- mex/sources/bytecode/ErrorHandling.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mex/sources/bytecode/ErrorHandling.hh b/mex/sources/bytecode/ErrorHandling.hh index 0df688648..a37a2813a 100644 --- a/mex/sources/bytecode/ErrorHandling.hh +++ b/mex/sources/bytecode/ErrorHandling.hh @@ -30,6 +30,7 @@ #define _USE_MATH_DEFINES #include +#include #ifndef M_PI # define M_PI (3.14159265358979323846) #endif @@ -165,7 +166,7 @@ public: FreeLibrary(hinstLib); }; #endif - GeneralExceptionHandling(string ErrorMsg_arg) : ErrorMsg(ErrorMsg_arg) + GeneralExceptionHandling(string ErrorMsg_arg) : ErrorMsg{move(ErrorMsg_arg)} { }; inline string