diff options
author | Rose <83477269+AtariDreams@users.noreply.github.com> | 2023-02-16 11:45:51 -0500 |
---|---|---|
committer | Rose <83477269+AtariDreams@users.noreply.github.com> | 2023-02-16 11:46:21 -0500 |
commit | 6089a04018dc912e11e11f8b0bd7d2118921e6af (patch) | |
tree | 20449c1c13d5d96ab3319136007f481d529e31b8 /absl/flags/internal/usage.cc | |
parent | 2d4c6872da56fa0d8156b01ab5658348d9c5de4d (diff) |
Prefer emplace back over push_back where emplace_back is more appropriate
This also helps a lot with dealing with conversions and data structure creation under the hood.
Diffstat (limited to 'absl/flags/internal/usage.cc')
-rw-r--r-- | absl/flags/internal/usage.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/flags/internal/usage.cc b/absl/flags/internal/usage.cc index 5efc7b07..e9481488 100644 --- a/absl/flags/internal/usage.cc +++ b/absl/flags/internal/usage.cc @@ -130,7 +130,7 @@ class FlagHelpPrettyPrinter { for (auto line : absl::StrSplit(str, absl::ByAnyChar("\n\r"))) { if (!tokens.empty()) { // Keep line separators in the input string. - tokens.push_back("\n"); + tokens.emplace_back("\n"); } for (auto token : absl::StrSplit(line, absl::ByAnyChar(" \t"), absl::SkipEmpty())) { |