mirror of https://github.com/milvus-io/milvus.git
Merge branch 'branch-0.4.0' into 'branch-0.4.0'
fix status constructor bugs See merge request megasearch/milvus!439 Former-commit-id: cc9158aaaebf4db564450111b28db5e8c4d32f14pull/191/head
commit
399ee6e244
|
@ -86,8 +86,7 @@ public:
|
|||
* @param status, status to be moved.
|
||||
*
|
||||
*/
|
||||
inline
|
||||
Status(Status &&s) noexcept : state_(s.state_) {};
|
||||
Status(Status &&s) noexcept ;
|
||||
|
||||
/**
|
||||
* @brief Status
|
||||
|
@ -173,7 +172,7 @@ public:
|
|||
static Status
|
||||
OK(Args &&... args) {
|
||||
return Status(StatusCode::OK, MessageBuilder(std::forward<Args>(args)...));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Invalid
|
||||
|
|
|
@ -28,6 +28,10 @@ void Status::MoveFrom(Status &s) {
|
|||
Status::Status(const Status &s)
|
||||
: state_((s.state_ == nullptr) ? nullptr : new State(*s.state_)) {}
|
||||
|
||||
Status::Status(Status &&s) noexcept {
|
||||
MoveFrom(s);
|
||||
}
|
||||
|
||||
Status &Status::operator=(const Status &s) {
|
||||
if (state_ != s.state_) {
|
||||
CopyFrom(s);
|
||||
|
|
Loading…
Reference in New Issue