From b72bcea864e6e38f14c8f0c94b7ea6019d7d8a01 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 28 Feb 2012 22:09:48 +0100 Subject: [PATCH] QPair: don't copy-initialise 'first'/'second' in the default ctor Why would we want copy-initialisation if we can have the default constructor? Change-Id: Id2de36d42ef9f63793ff4e3ec36202d3f2bf5f30 Reviewed-by: Olivier Goffart --- src/corelib/tools/qpair.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index 064a750..5df33a4 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -55,7 +55,7 @@ struct QPair typedef T1 first_type; typedef T2 second_type; - QPair() : first(T1()), second(T2()) {} + QPair() : first(), second() {} QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {} // compiler-generated copy/move ctor/assignment operators are fine! -- 2.7.4