[all-commits] [llvm/llvm-project] d648ee: [libc++] Simplify the implementation of reserve() ...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Thu Nov 28 14:08:06 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d648eed5899c4be10f1f7866eebef2bc171e673f
      https://github.com/llvm/llvm-project/commit/d648eed5899c4be10f1f7866eebef2bc171e673f
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2024-11-28 (Thu, 28 Nov 2024)

  Changed paths:
    M libcxx/include/string

  Log Message:
  -----------
  [libc++] Simplify the implementation of reserve() and shrink_to_fit() (#113453)

Since we changed the implementation of `reserve(size_type)` to only ever
extend,
it doesn't make a ton of sense anymore to have `__shrink_or_extend`,
since the code
paths of `reserve` and `shrink_to_fit` are now almost completely
separate.

This patch splits up `__shrink_or_extend` so that the individual parts
are in `reserve`
and `shrink_to_fit` depending on where they are needed.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list