[C++] Fix missing #ifdef for undefined identifiers (#9201)

* Fix #if for undefined identifiers

* port_undef.inc
pull/8466/head
Rose 3 years ago committed by GitHub
parent d5b7f705f3
commit ef1c9fd907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/google/protobuf/inlined_string_field.h
  2. 4
      src/google/protobuf/port_def.inc
  3. 2
      src/google/protobuf/port_undef.inc

@ -347,7 +347,7 @@ inline void InlinedStringField::Swap(
InlinedStringField* from, const std::string* /*default_value*/,
Arena* arena, bool donated, bool from_donated, uint32_t* donating_states,
uint32_t* from_donating_states, uint32_t mask) {
#if GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE
#ifdef GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE
// If one is donated and the other is not, undonate the donated one.
if (donated && !from_donated) {
MutableSlow(arena, donated, donating_states, mask);

@ -617,7 +617,7 @@
#ifdef PROTOBUF_PRAGMA_INIT_SEG
#error PROTOBUF_PRAGMA_INIT_SEG was previously defined
#endif
#if _MSC_VER
#ifdef _MSC_VER
#define PROTOBUF_PRAGMA_INIT_SEG __pragma(init_seg(lib))
#else
#define PROTOBUF_PRAGMA_INIT_SEG
@ -784,7 +784,7 @@
#endif
// Silence some MSVC warnings in all our code.
#if _MSC_VER
#ifdef _MSC_VER
#pragma warning(push)
// For non-trivial unions
#pragma warning(disable : 4582)

@ -140,6 +140,6 @@
#endif
// Pop the warning(push) from port_def.inc
#if _MSC_VER
#ifdef _MSC_VER
#pragma warning(pop)
#endif

Loading…
Cancel
Save