[icinga-checkins] icinga.org: icinga2/master: Avoid unnecessary copies when using Dictionary ::Pair in loops

git at icinga.org git at icinga.org
Wed Aug 31 00:11:13 CEST 2016


Module: icinga2
Branch: master
Commit: 5127a193b48cec6c7c1317fd34413dfadfd6ce0f
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=5127a193b48cec6c7c1317fd34413dfadfd6ce0f

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Tue Aug 30 23:01:54 2016 +0200

Avoid unnecessary copies when using Dictionary::Pair in loops

refs #12509

---

 lib/base/dictionary.hpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/base/dictionary.hpp b/lib/base/dictionary.hpp
index ff2e4b5..edacaa2 100644
--- a/lib/base/dictionary.hpp
+++ b/lib/base/dictionary.hpp
@@ -47,7 +47,7 @@ public:
 
 	typedef std::map<String, Value>::size_type SizeType;
 
-	typedef std::pair<String, Value> Pair;
+	typedef std::map<String, Value>::value_type Pair;
 
 	inline Dictionary(void)
 	{ }



More information about the icinga-checkins mailing list