aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/default_value_objectwriter.h
diff options
context:
space:
mode:
authorGravatar stone4774 <25053818+stone4774@users.noreply.github.com>2018-03-22 11:16:34 +0800
committerGravatar GitHub <noreply@github.com>2018-03-22 11:16:34 +0800
commitc99f5278eb8dad6f42def88ce8b5a3453f6df4a8 (patch)
treec3cd284ec9d2981f61da266d040935b73275b5c4 /src/google/protobuf/util/internal/default_value_objectwriter.h
parentd053271deebe0efcd41729991b1f3d618b638ad5 (diff)
parented4321d1cb33199984118d801956822842771e7e (diff)
Merge branch 'master' into fixbug_enum2json2
Diffstat (limited to 'src/google/protobuf/util/internal/default_value_objectwriter.h')
-rw-r--r--src/google/protobuf/util/internal/default_value_objectwriter.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/google/protobuf/util/internal/default_value_objectwriter.h b/src/google/protobuf/util/internal/default_value_objectwriter.h
index 59f508cd..6e71f9c8 100644
--- a/src/google/protobuf/util/internal/default_value_objectwriter.h
+++ b/src/google/protobuf/util/internal/default_value_objectwriter.h
@@ -32,9 +32,6 @@
#define GOOGLE_PROTOBUF_UTIL_CONVERTER_DEFAULT_VALUE_OBJECTWRITER_H__
#include <memory>
-#ifndef _SHARED_PTR_H
-#include <google/protobuf/stubs/shared_ptr.h>
-#endif
#include <stack>
#include <vector>
@@ -77,7 +74,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
FieldScrubCallBack;
// A unique pointer to a DefaultValueObjectWriter::FieldScrubCallBack.
- typedef google::protobuf::scoped_ptr<FieldScrubCallBack> FieldScrubCallBackPtr;
+ typedef std::unique_ptr<FieldScrubCallBack> FieldScrubCallBackPtr;
DefaultValueObjectWriter(TypeResolver* type_resolver,
const google::protobuf::Type& type,
@@ -282,7 +279,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
void MaybePopulateChildrenOfAny(Node* node);
// Writes the root_ node to ow_ and resets the root_ and current_ pointer to
- // NULL.
+ // nullptr.
void WriteRoot();
// Adds or replaces the data_ of a primitive child node.
@@ -308,7 +305,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// The current Node. Owned by its parents.
Node* current_;
// The root Node.
- google::protobuf::scoped_ptr<Node> root_;
+ std::unique_ptr<Node> root_;
// The stack to hold the path of Nodes from current_ to root_;
std::stack<Node*> stack_;