Merge pull request #1360 from pherl/master
Use the T() instead of NULL for the default value.
This commit is contained in:
commit
a25e9964b1
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue