Skip to content
Snippets Groups Projects
Commit 55d21572 authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

change from const refs to value and use std::move

when compiling with undefined behaviour sanitizer and gcc 8.2
a -Werror=maybe-uninitialized warning appears when using the const refs
the std::move variant does not have this problem
parent 1a285161
Branches
Tags
No related merge requests found
......@@ -128,8 +128,8 @@ public:
public:
//**Constructors**************************************************************************************************
explicit Parameter():parameter_(),error_(noerror) {}
explicit Parameter( const Type& parameter, ErrorCode err, const std::string & key )
: parameter_(parameter), error_(err), key_(key) {}
explicit Parameter(Type parameter, ErrorCode err, std::string key )
: parameter_(std::move(parameter)), error_(err), key_(std::move(key)) {}
// No explicitly declared copy constructor.
//****************************************************************************************************************
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment