From 55d21572e40c6ff6f5261455e369c957bc1f8102 Mon Sep 17 00:00:00 2001
From: Dominik Thoennes <dominik.thoennes@fau.de>
Date: Thu, 28 Feb 2019 17:25:46 -0800
Subject: [PATCH] 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
---
 src/core/config/Config.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/config/Config.h b/src/core/config/Config.h
index e36d57830..2aa451308 100644
--- a/src/core/config/Config.h
+++ b/src/core/config/Config.h
@@ -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.
       //****************************************************************************************************************
 
-- 
GitLab