diff options
Diffstat (limited to 'src/google/protobuf/has_bits.h')
-rw-r--r-- | src/google/protobuf/has_bits.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/google/protobuf/has_bits.h b/src/google/protobuf/has_bits.h index e3a0149a..d15b3f8d 100644 --- a/src/google/protobuf/has_bits.h +++ b/src/google/protobuf/has_bits.h @@ -32,7 +32,13 @@ #define GOOGLE_PROTOBUF_HAS_BITS_H__ #include <google/protobuf/stubs/common.h> -#include <google/protobuf/stubs/port.h> +#include <google/protobuf/port.h> + +#include <google/protobuf/port_def.inc> + +#ifdef SWIG +#error "You cannot SWIG proto headers" +#endif namespace google { namespace protobuf { @@ -41,18 +47,17 @@ namespace internal { template<size_t doublewords> class HasBits { public: - HasBits() GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE { Clear(); } + HasBits() PROTOBUF_ALWAYS_INLINE { Clear(); } - void Clear() GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE { + void Clear() PROTOBUF_ALWAYS_INLINE { memset(has_bits_, 0, sizeof(has_bits_)); } - ::google::protobuf::uint32& operator[](int index) GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE { + ::google::protobuf::uint32& operator[](int index) PROTOBUF_ALWAYS_INLINE { return has_bits_[index]; } - const ::google::protobuf::uint32& operator[](int index) const - GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE { + const ::google::protobuf::uint32& operator[](int index) const PROTOBUF_ALWAYS_INLINE { return has_bits_[index]; } @@ -100,6 +105,8 @@ inline bool HasBits<doublewords>::empty() const { } // namespace internal } // namespace protobuf - } // namespace google + +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_HAS_BITS_H__ |