From a7e131f53e211ffbe38d34d23b33e13cc401f013 Mon Sep 17 00:00:00 2001
From: Loïc Blot <nerzhul@users.noreply.github.com>
Date: Tue, 25 Apr 2017 10:17:53 +0200
Subject: Fix various points reported by cppcheck (#5656)

* Fix various performance issues reported by cppcheck + code style (CI)

* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function

* Fix various iterator post-increment reported by cppcheck
---
 src/util/thread.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/util')

diff --git a/src/util/thread.h b/src/util/thread.h
index f54b8b48f..b96f302f6 100644
--- a/src/util/thread.h
+++ b/src/util/thread.h
@@ -83,8 +83,8 @@ public:
 	GetRequest() {}
 	~GetRequest() {}
 
-	GetRequest(Key a_key) {
-		key = a_key;
+	GetRequest(const Key &a_key): key(a_key)
+	{
 	}
 
 	Key key;
@@ -106,7 +106,7 @@ public:
 		return m_queue.empty();
 	}
 
-	void add(Key key, Caller caller, CallerData callerdata,
+	void add(const Key &key, Caller caller, CallerData callerdata,
 		ResultQueue<Key, T, Caller, CallerData> *dest)
 	{
 		typename std::deque<GetRequest<Key, T, Caller, CallerData> >::iterator i;
-- 
cgit v1.2.3