summaryrefslogtreecommitdiff
path: root/absl/strings/str_cat.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-05-13 11:31:11 -0700
committerGravatar vslashg <gfalcon@google.com>2021-05-13 15:59:01 -0400
commitaad2c8a3966424bbaa2f26027d104d17f9c1c1ae (patch)
treeab4f61bfb0ec4af44fbdd08bb0be7a44f8335a2d /absl/strings/str_cat.cc
parentce42de10fbea616379826e91c7c23c16bffe6e61 (diff)
Export of internal Abseil changes
-- 912c205cf80c4ed24a08000c04263403857b7f75 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 373620391 -- d454f10549d27d7b025d1ce0ef90a0cdec42c361 by Martijn Vels <mvels@google.com>: Add SetCordRepForTesting() helper to CordzInfo PiperOrigin-RevId: 373602832 -- 7a2d7bdd2e60fb51333e81cd71ebd0a4edb60704 by Evan Brown <ezb@google.com>: For StrAppend, make sure to follow exponential growth like std::string::append. PiperOrigin-RevId: 373589332 -- 24397f19bce45133a42feaa7c883009ef9325095 by Greg Falcon <gfalcon@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 373569246 GitOrigin-RevId: 912c205cf80c4ed24a08000c04263403857b7f75 Change-Id: I5444f7ca2c0980685ca5c51596c259b845d69673
Diffstat (limited to 'absl/strings/str_cat.cc')
-rw-r--r--absl/strings/str_cat.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/absl/strings/str_cat.cc b/absl/strings/str_cat.cc
index dd5d25b0..f4a77493 100644
--- a/absl/strings/str_cat.cc
+++ b/absl/strings/str_cat.cc
@@ -174,7 +174,7 @@ void AppendPieces(std::string* dest,
ASSERT_NO_OVERLAP(*dest, piece);
total_size += piece.size();
}
- strings_internal::STLStringResizeUninitialized(dest, total_size);
+ strings_internal::STLStringResizeUninitializedAmortized(dest, total_size);
char* const begin = &(*dest)[0];
char* out = begin + old_size;
@@ -199,7 +199,7 @@ void StrAppend(std::string* dest, const AlphaNum& a, const AlphaNum& b) {
ASSERT_NO_OVERLAP(*dest, a);
ASSERT_NO_OVERLAP(*dest, b);
std::string::size_type old_size = dest->size();
- strings_internal::STLStringResizeUninitialized(
+ strings_internal::STLStringResizeUninitializedAmortized(
dest, old_size + a.size() + b.size());
char* const begin = &(*dest)[0];
char* out = begin + old_size;
@@ -214,7 +214,7 @@ void StrAppend(std::string* dest, const AlphaNum& a, const AlphaNum& b,
ASSERT_NO_OVERLAP(*dest, b);
ASSERT_NO_OVERLAP(*dest, c);
std::string::size_type old_size = dest->size();
- strings_internal::STLStringResizeUninitialized(
+ strings_internal::STLStringResizeUninitializedAmortized(
dest, old_size + a.size() + b.size() + c.size());
char* const begin = &(*dest)[0];
char* out = begin + old_size;
@@ -231,7 +231,7 @@ void StrAppend(std::string* dest, const AlphaNum& a, const AlphaNum& b,
ASSERT_NO_OVERLAP(*dest, c);
ASSERT_NO_OVERLAP(*dest, d);
std::string::size_type old_size = dest->size();
- strings_internal::STLStringResizeUninitialized(
+ strings_internal::STLStringResizeUninitializedAmortized(
dest, old_size + a.size() + b.size() + c.size() + d.size());
char* const begin = &(*dest)[0];
char* out = begin + old_size;