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