aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYangqing Jia <jiayq84@gmail.com>2015-12-09 15:25:02 -0800
committerYangqing Jia <jiayq84@gmail.com>2015-12-09 15:25:02 -0800
commit031558bd36849ed4ca830b86b62e42ca27151cb6 (patch)
tree33bd2c31e1799fee63754cba91bf42f9e648d326 /src
parentbbf64cee3d6fece7da5992caf89da72bb1fd1a47 (diff)
downloadprotobuf-031558bd36849ed4ca830b86b62e42ca27151cb6.tar.gz
protobuf-031558bd36849ed4ca830b86b62e42ca27151cb6.tar.bz2
protobuf-031558bd36849ed4ca830b86b62e42ca27151cb6.zip
Minor changes to match the internal version
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/arena.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h
index ac3d675b..40c1e7c2 100644
--- a/src/google/protobuf/arena.h
+++ b/src/google/protobuf/arena.h
@@ -511,8 +511,7 @@ class LIBPROTOBUF_EXPORT Arena {
struct is_arena_constructable :
public google::protobuf::internal::integral_constant<bool,
sizeof(InternalIsArenaConstructableHelper::ArenaConstructable<
- const T>(static_cast<const T*>(0))) ==
- sizeof(char)> {
+ const T>(static_cast<const T*>(0))) == sizeof(char)> {
};
private:
@@ -574,6 +573,7 @@ class LIBPROTOBUF_EXPORT Arena {
return google::protobuf::internal::has_trivial_destructor<T>::value;
}
+ private:
struct InternalIsDestructorSkippableHelper {
template<typename U>
static char DestructorSkippable(
@@ -582,6 +582,7 @@ class LIBPROTOBUF_EXPORT Arena {
static double DestructorSkippable(...);
};
+ public:
// Helper typetrait that indicates whether the desctructor of type T should be
// called when arena is destroyed at compile time. This is only to allow
// construction of higher-level templated utilities.
@@ -778,10 +779,10 @@ class LIBPROTOBUF_EXPORT Arena {
// which needs to declare google::protobuf::Map as friend of generated message.
template <typename T>
static void CreateInArenaStorage(T* ptr, Arena* arena) {
- CreateInArenaStorageInternal(
- ptr, arena, typename is_arena_constructable<T>::type());
- RegisterDestructorInternal(
- ptr, arena, typename is_destructor_skippable<T>::type());
+ CreateInArenaStorageInternal(ptr, arena,
+ typename is_arena_constructable<T>::type());
+ RegisterDestructorInternal(ptr, arena,
+ typename is_destructor_skippable<T>::type());
}
template <typename T>