From 67952fab2c766ac5eacc15bb78e5af4039a3d398 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Wed, 14 Mar 2018 11:17:48 -0700 Subject: Deleted scoped_ptr.h We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr. --- src/google/protobuf/stubs/strutil.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/google/protobuf/stubs/strutil.cc') diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc index 28bcd3b2..552d416f 100644 --- a/src/google/protobuf/stubs/strutil.cc +++ b/src/google/protobuf/stubs/strutil.cc @@ -469,7 +469,7 @@ int UnescapeCEscapeString(const string& src, string* dest) { int UnescapeCEscapeString(const string& src, string* dest, std::vector *errors) { - scoped_array unescaped(new char[src.size() + 1]); + std::unique_ptr unescaped(new char[src.size() + 1]); int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), errors); GOOGLE_CHECK(dest); dest->assign(unescaped.get(), len); @@ -477,7 +477,7 @@ int UnescapeCEscapeString(const string& src, string* dest, } string UnescapeCEscapeString(const string& src) { - scoped_array unescaped(new char[src.size() + 1]); + std::unique_ptr unescaped(new char[src.size() + 1]); int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), NULL); return string(unescaped.get(), len); } @@ -620,7 +620,7 @@ namespace strings { string Utf8SafeCEscape(const string& src) { const int dest_length = src.size() * 4 + 1; // Maximum possible expansion - scoped_array dest(new char[dest_length]); + std::unique_ptr dest(new char[dest_length]); const int len = CEscapeInternal(src.data(), src.size(), dest.get(), dest_length, false, true); GOOGLE_DCHECK_GE(len, 0); @@ -629,7 +629,7 @@ string Utf8SafeCEscape(const string& src) { string CHexEscape(const string& src) { const int dest_length = src.size() * 4 + 1; // Maximum possible expansion - scoped_array dest(new char[dest_length]); + std::unique_ptr dest(new char[dest_length]); const int len = CEscapeInternal(src.data(), src.size(), dest.get(), dest_length, true, false); GOOGLE_DCHECK_GE(len, 0); -- cgit v1.2.3