aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2016-03-30 11:28:54 -0700
committerJisi Liu <liujisi@google.com>2016-03-30 11:28:54 -0700
commita25e9964b126a79e8a99bced2207ddca22d6a1a9 (patch)
tree4e5e5bae920e62f6dfbf923370b24c329e367cd3
parent34d0cc220b88faf300036a41cb8bec2499c6339a (diff)
parente164f1083fd08e61bbad9c79a37058f1aeca4086 (diff)
downloadprotobuf-a25e9964b126a79e8a99bced2207ddca22d6a1a9.tar.gz
protobuf-a25e9964b126a79e8a99bced2207ddca22d6a1a9.tar.bz2
protobuf-a25e9964b126a79e8a99bced2207ddca22d6a1a9.zip
Merge pull request #1360 from pherl/master
Use the T() instead of NULL for the default value.
-rw-r--r--src/google/protobuf/stubs/statusor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/statusor.h b/src/google/protobuf/stubs/statusor.h
index ad848701..29f869ad 100644
--- a/src/google/protobuf/stubs/statusor.h
+++ b/src/google/protobuf/stubs/statusor.h
@@ -224,7 +224,7 @@ inline StatusOr<T>& StatusOr<T>::operator=(const StatusOr<T>& other) {
template<typename T>
template<typename U>
inline StatusOr<T>::StatusOr(const StatusOr<U>& other)
- : status_(other.status_), value_(other.status_.ok() ? other.value_ : NULL) {
+ : status_(other.status_), value_(other.status_.ok() ? other.value_ : T()) {
}
template<typename T>