diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-02-28 22:09:48 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-29 00:05:38 +0100 |
commit | b72bcea864e6e38f14c8f0c94b7ea6019d7d8a01 (patch) | |
tree | 222cd476c45b37cc3f638ad8b31007239ea35e61 /src/corelib/tools/qpair.h | |
parent | 525d98725b72984e3d2526415829b763fc7654ea (diff) |
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>
Diffstat (limited to 'src/corelib/tools/qpair.h')
-rw-r--r-- | src/corelib/tools/qpair.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index 064a75048c..5df33a4e9d 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! |