bkietz commented on code in PR #44493:
URL: https://github.com/apache/arrow/pull/44493#discussion_r1823572260


##########
cpp/src/arrow/status.cc:
##########
@@ -26,18 +28,19 @@ Status::Status(StatusCode code, const std::string& msg)
 
 Status::Status(StatusCode code, std::string msg, std::shared_ptr<StatusDetail> 
detail) {
   ARROW_CHECK_NE(code, StatusCode::OK) << "Cannot construct ok status with 
message";
-  state_ = new State;
-  state_->code = code;
-  state_->msg = std::move(msg);
-  if (detail != nullptr) {
-    state_->detail = std::move(detail);
-  }
+  state_ = new State{code, std::move(msg), std::move(detail)};
 }
 
+// We would prefer that this destructor *not* be inlined, since the vast 
majority of
+// Statuses are OK and so inlining would superflously increase binary size.
+Status::State::~State() = default;

Review Comment:
   I'll try writing out the conditions and keeping DeleteState non-inline



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to