From 8876622b6fcebc21672bc263666b858b7e152b45 Mon Sep 17 00:00:00 2001 From: Gil Date: Thu, 12 Apr 2018 14:54:53 -0700 Subject: Add clang-tidy checks for Firestore (#1078) * Add a .clang-tidy configuration for Firestore C++ * Fix clang-tidy warnings * typedef -> using * const ref + rvalue ref -> pass by value * NULL -> nullptr * remove useless default initializations * remove useless const value-type parameter declarations (definitions can still use them) * use auto instead of repeating types in a cast * Fix typos * Address use of static method through instance warnings * Address use after move warnings --- .../core/test/firebase/firestore/immutable/array_sorted_map_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc') diff --git a/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc b/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc index fceab7d..6758dd5 100644 --- a/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc +++ b/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc @@ -29,7 +29,7 @@ namespace firestore { namespace immutable { namespace impl { -typedef ArraySortedMap IntMap; +using IntMap = ArraySortedMap; constexpr IntMap::size_type kFixedSize = IntMap::kFixedSize; // TODO(wilhuff): ReverseTraversal @@ -153,7 +153,7 @@ TEST(ArraySortedMap, EmptyRemoval) { TEST(ArraySortedMap, InsertionAndRemovalOfMaxItems) { auto expected_size = kFixedSize; - int n = static_cast(expected_size); + auto n = static_cast(expected_size); std::vector to_insert = Shuffled(Sequence(n)); std::vector to_remove = Shuffled(to_insert); -- cgit v1.2.3