Merge pull request #1753 from xfxyjwf/fixup

Fix problems detected when integrating the code to our internal repo.
This commit is contained in:
Jisi Liu 2016-07-07 09:19:40 -07:00 committed by GitHub
commit eaf3451cbb
2 changed files with 2 additions and 10 deletions

View File

@ -222,14 +222,6 @@ class LIBPROTOBUF_EXPORT StringPiece {
: ptr_(str.data()), length_(0) {
length_ = CheckedSsizeTFromSizeT(str.size());
}
#if defined(HAS_GLOBAL_STRING)
template <class Allocator>
StringPiece( // NOLINT(runtime/explicit)
const basic_string<char, std::char_traits<char>, Allocator>& str)
: ptr_(str.data()), length_(0) {
length_ = CheckedSsizeTFromSizeT(str.size());
}
#endif
StringPiece(const char* offset, stringpiece_ssize_type len)
: ptr_(offset), length_(len) {

View File

@ -64,6 +64,7 @@ ProtoWriter::ProtoWriter(TypeResolver* type_resolver,
typeinfo_(TypeInfo::NewTypeInfo(type_resolver)),
own_typeinfo_(true),
done_(false),
ignore_unknown_fields_(false),
element_(NULL),
size_insert_(),
output_(output),
@ -71,7 +72,6 @@ ProtoWriter::ProtoWriter(TypeResolver* type_resolver,
adapter_(&buffer_),
stream_(new CodedOutputStream(&adapter_)),
listener_(listener),
ignore_unknown_fields_(false),
invalid_depth_(0),
tracker_(new ObjectLocationTracker()) {}
@ -82,6 +82,7 @@ ProtoWriter::ProtoWriter(const TypeInfo* typeinfo,
typeinfo_(typeinfo),
own_typeinfo_(false),
done_(false),
ignore_unknown_fields_(false),
element_(NULL),
size_insert_(),
output_(output),
@ -89,7 +90,6 @@ ProtoWriter::ProtoWriter(const TypeInfo* typeinfo,
adapter_(&buffer_),
stream_(new CodedOutputStream(&adapter_)),
listener_(listener),
ignore_unknown_fields_(false),
invalid_depth_(0),
tracker_(new ObjectLocationTracker()) {}