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 <ogoffart@woboq.com>
bb10
Marc Mutz 2012-02-28 22:09:48 +01:00 committed by Qt by Nokia
parent 525d98725b
commit b72bcea864
1 changed files with 1 additions and 1 deletions

View File

@ -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!