| 446 | } |
| 447 | |
| 448 | bool Status::Equals(const Status& s) const { |
| 449 | if (state_ == s.state_) { |
| 450 | return true; |
| 451 | } |
| 452 | |
| 453 | if (ok() || s.ok()) { |
| 454 | return false; |
| 455 | } |
| 456 | |
| 457 | if (detail() != s.detail()) { |
| 458 | if ((detail() && !s.detail()) || (!detail() && s.detail())) { |
| 459 | return false; |
| 460 | } |
| 461 | return *detail() == *s.detail(); |
| 462 | } |
| 463 | |
| 464 | return code() == s.code() && message() == s.message(); |
| 465 | } |
| 466 | |
| 467 | /// \cond FALSE |
| 468 | // (note: emits warnings on Doxygen < 1.8.15, |