diff options
Diffstat (limited to 'absl')
-rw-r--r-- | absl/container/internal/compressed_tuple.h | 2 | ||||
-rw-r--r-- | absl/strings/internal/str_split_internal.h | 4 | ||||
-rw-r--r-- | absl/strings/str_split_test.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/absl/container/internal/compressed_tuple.h b/absl/container/internal/compressed_tuple.h index 02bfd03f..5ebe1649 100644 --- a/absl/container/internal/compressed_tuple.h +++ b/absl/container/internal/compressed_tuple.h @@ -257,7 +257,7 @@ class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple template <int I> ElemT<I>& get() & { - return internal_compressed_tuple::Storage<ElemT<I>, I>::get(); + return StorageT<I>::get(); } template <int I> diff --git a/absl/strings/internal/str_split_internal.h b/absl/strings/internal/str_split_internal.h index 6f5bc095..49ec5392 100644 --- a/absl/strings/internal/str_split_internal.h +++ b/absl/strings/internal/str_split_internal.h @@ -336,7 +336,7 @@ class Splitter { Container operator()(const Splitter& splitter) const { Container c; auto it = std::inserter(c, c.end()); - for (const auto sp : splitter) { + for (const auto& sp : splitter) { *it++ = ValueType(sp); } return c; @@ -401,7 +401,7 @@ class Splitter { Container m; typename Container::iterator it; bool insert = true; - for (const auto sp : splitter) { + for (const auto& sp : splitter) { if (insert) { it = Inserter<Container>::Insert(&m, First(sp), Second()); } else { diff --git a/absl/strings/str_split_test.cc b/absl/strings/str_split_test.cc index b5ce68de..7f7c097f 100644 --- a/absl/strings/str_split_test.cc +++ b/absl/strings/str_split_test.cc @@ -367,7 +367,7 @@ TEST(SplitIterator, EqualityAsEndCondition) { TEST(Splitter, RangeIterators) { auto splitter = absl::StrSplit("a,b,c", ','); std::vector<absl::string_view> output; - for (const absl::string_view p : splitter) { + for (const absl::string_view& p : splitter) { output.push_back(p); } EXPECT_THAT(output, ElementsAre("a", "b", "c")); |