Ban absl::StrSplit and absl::StrJoin
For binary size reasons; they emit too many instructions at each call site. I decided to not point out replacements for them, since rtc::join has only one caller, and rtc::split isn't the only option for splitting strings. And both of them have APIs that can cause the creation of needless temporary strings. Bug: none Change-Id: I06161012836a90b09249c2813d2ddc15f167d580 Notry: true Reviewed-on: https://webrtc-review.googlesource.com/c/124480 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26846}
This commit is contained in:
@ -49,9 +49,9 @@ and avoid `absl::Span` until C++20 is finalized and the Abseil team
|
||||
has decided if they will change `absl::Span` to match.
|
||||
[Bug](https://bugs.webrtc.org/9214).
|
||||
|
||||
### `absl::StrCat` and `absl::StrAppend`
|
||||
### `absl::StrCat`, `absl::StrAppend`, `absl::StrJoin`, `absl::StrSplit`
|
||||
|
||||
*Use `rtc::SimpleStringBuilder` instead.*
|
||||
*Use `rtc::SimpleStringBuilder` to build strings.*
|
||||
|
||||
These are optimized for speed, not binary size. Even `StrCat` calls
|
||||
with a modest number of arguments can easily add several hundred bytes
|
||||
|
Reference in New Issue
Block a user