| 33 | } |
| 34 | |
| 35 | void Status::CopyFrom(const Status& s) { |
| 36 | if (ARROW_PREDICT_FALSE(state_ != NULL)) { |
| 37 | if (!state_->is_constant) { |
| 38 | DeleteState(); |
| 39 | } |
| 40 | } |
| 41 | if (s.state_ == nullptr) { |
| 42 | state_ = nullptr; |
| 43 | } else if (s.state_->is_constant) { |
| 44 | state_ = s.state_; |
| 45 | } else { |
| 46 | state_ = new State(*s.state_); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | std::string Status::CodeAsString() const { |
| 51 | if (state_ == nullptr) { |