Skip to content

Commit

Permalink
Try to fix build issue on centos7 + gcc9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sherman-the-tank committed Dec 22, 2021
1 parent bd965bb commit fcb3016
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/base/Status.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Status final {
~Status() = default;

Status(const Status &rhs) {
state_ = rhs.state_ == nullptr ? nullptr : copyState(rhs.state_.get());
state_ = (!rhs.state_ ? nullptr : copyState(rhs.state_.get()));
}

Status &operator=(const Status &rhs) {
Expand Down Expand Up @@ -203,7 +203,7 @@ class Status final {
// state_[0..1] length of the error msg, i.e. size() - kHeaderSize
// state_[2..3] code
// state_[4...] verbose error message
std::unique_ptr<const char[]> state_{nullptr};
std::unique_ptr<const char[]> state_;
};

inline std::ostream &operator<<(std::ostream &os, const Status &status) {
Expand Down

0 comments on commit fcb3016

Please sign in to comment.