diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 8aedb6bd48..96bd00f777 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT Any final } inline Any& operator=(Any&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 8059af8683..b69fbe91c1 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -93,11 +93,7 @@ class PROTOBUF_EXPORT Mixin final } inline Mixin& operator=(Mixin&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -305,11 +301,7 @@ class PROTOBUF_EXPORT Method final } inline Method& operator=(Method&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -590,11 +582,7 @@ class PROTOBUF_EXPORT Api final } inline Api& operator=(Api&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 77ce0dd73f..db1a56242b 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT Duration final } inline Duration& operator=(Duration&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index ab576f577f..0fb6113886 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT Empty final } inline Empty& operator=(Empty&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 0d1fe8a975..9734e5e11a 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT FieldMask final } inline FieldMask& operator=(FieldMask&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index c20388f9ba..589afa5499 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT SourceContext final } inline SourceContext& operator=(SourceContext&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 6ec8bbaf3f..4379f3c430 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -130,11 +130,7 @@ class PROTOBUF_EXPORT ListValue final } inline ListValue& operator=(ListValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -325,11 +321,7 @@ class PROTOBUF_EXPORT Struct final } inline Struct& operator=(Struct&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -560,11 +552,7 @@ class PROTOBUF_EXPORT Value final } inline Value& operator=(Value&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index dfcb612a2f..43fcee35aa 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -85,11 +85,7 @@ class PROTOBUF_EXPORT Timestamp final } inline Timestamp& operator=(Timestamp&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 92e71a567e..9adb2bdf90 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -219,11 +219,7 @@ class PROTOBUF_EXPORT Option final } inline Option& operator=(Option&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -431,11 +427,7 @@ class PROTOBUF_EXPORT Field final } inline Field& operator=(Field&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -815,11 +807,7 @@ class PROTOBUF_EXPORT EnumValue final } inline EnumValue& operator=(EnumValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1040,11 +1028,7 @@ class PROTOBUF_EXPORT Type final } inline Type& operator=(Type&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1344,11 +1328,7 @@ class PROTOBUF_EXPORT Enum final } inline Enum& operator=(Enum&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 59b46512a9..e93066c52e 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -109,11 +109,7 @@ class PROTOBUF_EXPORT UInt64Value final } inline UInt64Value& operator=(UInt64Value&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -297,11 +293,7 @@ class PROTOBUF_EXPORT UInt32Value final } inline UInt32Value& operator=(UInt32Value&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -485,11 +477,7 @@ class PROTOBUF_EXPORT StringValue final } inline StringValue& operator=(StringValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -679,11 +667,7 @@ class PROTOBUF_EXPORT Int64Value final } inline Int64Value& operator=(Int64Value&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -867,11 +851,7 @@ class PROTOBUF_EXPORT Int32Value final } inline Int32Value& operator=(Int32Value&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1055,11 +1035,7 @@ class PROTOBUF_EXPORT FloatValue final } inline FloatValue& operator=(FloatValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1243,11 +1219,7 @@ class PROTOBUF_EXPORT DoubleValue final } inline DoubleValue& operator=(DoubleValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1431,11 +1403,7 @@ class PROTOBUF_EXPORT BytesValue final } inline BytesValue& operator=(BytesValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from); @@ -1625,11 +1593,7 @@ class PROTOBUF_EXPORT BoolValue final } inline BoolValue& operator=(BoolValue&& from) noexcept { if (this == &from) return *this; - if (GetArena() == from.GetArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { InternalSwap(&from); } else { CopyFrom(from);