[libcxx-commits] [PATCH] D102727: Use precise growth rather than amortized growth in std::string::resize/__resize_default_init.

Evan Brown via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 19 15:18:55 PDT 2021


ezbr updated this revision to Diff 359941.
ezbr added a comment.

Try again to update phabricator review. The previous attempt somehow only had the test file change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102727/new/

https://reviews.llvm.org/D102727

Files:
  libcxx/test/libcxx/strings/basic.string/string.capacity/resize.exact.cpp


Index: libcxx/test/libcxx/strings/basic.string/string.capacity/resize.exact.cpp
===================================================================
--- libcxx/test/libcxx/strings/basic.string/string.capacity/resize.exact.cpp
+++ libcxx/test/libcxx/strings/basic.string/string.capacity/resize.exact.cpp
@@ -22,8 +22,7 @@
 bool is_between(size_t c, size_t low, size_t hi) { return c >= low && c <= hi; }
 
 template <class S>
-void test()
-{
+void test() {
   // Tests that resize() uses exact growth rather than exponential growth.
   const size_t kSsoSize = S().capacity();
   const size_t kAlign = 16;
@@ -45,8 +44,7 @@
   }
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   {
     typedef std::string S;
     test<S>();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102727.359941.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210719/7f536021/attachment.bin>


More information about the libcxx-commits mailing list