summaryrefslogtreecommitdiff
path: root/absl/status/status.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/status/status.cc')
-rw-r--r--absl/status/status.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/absl/status/status.cc b/absl/status/status.cc
index c71de846..7962bb9e 100644
--- a/absl/status/status.cc
+++ b/absl/status/status.cc
@@ -207,10 +207,12 @@ void Status::UnrefNonInlined(uintptr_t rep) {
}
}
-uintptr_t Status::NewRep(absl::StatusCode code, absl::string_view msg,
- std::unique_ptr<status_internal::Payloads> payloads) {
+uintptr_t Status::NewRep(
+ absl::StatusCode code, absl::string_view msg,
+ std::unique_ptr<status_internal::Payloads> payloads) {
status_internal::StatusRep* rep = new status_internal::StatusRep(
- code, std::string(msg.data(), msg.size()), std::move(payloads));
+ code, std::string(msg.data(), msg.size()),
+ std::move(payloads));
return PointerToRep(rep);
}
@@ -236,8 +238,9 @@ absl::StatusCode Status::code() const {
void Status::PrepareToModify() {
ABSL_RAW_CHECK(!ok(), "PrepareToModify shouldn't be called on OK status.");
if (IsInlined(rep_)) {
- rep_ = NewRep(static_cast<absl::StatusCode>(raw_code()),
- absl::string_view(), nullptr);
+ rep_ =
+ NewRep(static_cast<absl::StatusCode>(raw_code()), absl::string_view(),
+ nullptr);
return;
}
@@ -248,7 +251,8 @@ void Status::PrepareToModify() {
if (rep->payloads) {
payloads = absl::make_unique<status_internal::Payloads>(*rep->payloads);
}
- rep_ = NewRep(rep->code, message(), std::move(payloads));
+ rep_ = NewRep(rep->code, message(),
+ std::move(payloads));
UnrefNonInlined(rep_i);
}
}