tuple: leave fields uninitialized in default constructors
Using "x()" in TupleLeaf's default constructor causes primitive types
(e.g., integers and pointers) to be zero initialized, whereas
previously Tuple left them indeterminate. Arguably zero-initializing
is better, but the change was inadvertant and results in a measurable
code size increase, so this CL reverts it (at least for now).
BUG=440806
Review URL: https://codereview.chromium.org/791883003
Cr-Commit-Position: refs/heads/master@{#308455}
CrOS-Libchrome-Original-Commit: f2c5add463f5fbb425934ef71390ca848a9df01a
diff --git a/base/tuple.h b/base/tuple.h
index 885413f..a0d2245 100644
--- a/base/tuple.h
+++ b/base/tuple.h
@@ -115,7 +115,7 @@
template <size_t N, typename T>
struct TupleLeaf {
- TupleLeaf() : x() {}
+ TupleLeaf() {}
explicit TupleLeaf(typename TupleTraits<T>::ParamType x) : x(x) {}
T& get() { return x; }
@@ -130,7 +130,7 @@
#define DEFINE_TUPLE_LEAF(N, x) \
template <typename T> \
struct TupleLeaf<N, T> { \
- TupleLeaf() : x() {} \
+ TupleLeaf() {} \
explicit TupleLeaf(typename TupleTraits<T>::ParamType x) : x(x) {} \
\
T& get() { return x; } \