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
parent
525d98725b
commit
b72bcea864
|
|
@ -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!
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue