[tidy] Check modernize-use-auto
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
This commit is contained in:
@@ -52,7 +52,7 @@ Rect<uint16_t> GlyphAtlas::addGlyph(uintptr_t tileUID,
|
||||
const uint8_t buffer = 3;
|
||||
|
||||
std::map<uint32_t, GlyphValue>& face = index[fontStack];
|
||||
std::map<uint32_t, GlyphValue>::iterator it = face.find(glyph.id);
|
||||
auto it = face.find(glyph.id);
|
||||
|
||||
// The glyph is already in this texture.
|
||||
if (it != face.end()) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace mbgl;
|
||||
|
||||
TEST(API, RenderWithoutCallback) {
|
||||
FixtureLogObserver* log = new FixtureLogObserver();
|
||||
auto log = new FixtureLogObserver();
|
||||
Log::setObserver(std::unique_ptr<Log::Observer>(log));
|
||||
|
||||
util::RunLoop loop;
|
||||
|
||||
@@ -26,7 +26,7 @@ TEST_P(StyleParserTest, ParseStyle) {
|
||||
ASSERT_FALSE(infoDoc.HasParseError());
|
||||
ASSERT_TRUE(infoDoc.IsObject());
|
||||
|
||||
FixtureLogObserver* observer = new FixtureLogObserver();
|
||||
auto observer = new FixtureLogObserver();
|
||||
Log::setObserver(std::unique_ptr<Log::Observer>(observer));
|
||||
|
||||
style::Parser parser;
|
||||
|
||||
@@ -80,8 +80,8 @@ TEST(ThreadLocalStorage, AutoReclaim) {
|
||||
|
||||
unsigned counter = 0;
|
||||
|
||||
DtorCounter* dtorCounter1 = new DtorCounter{ &counter };
|
||||
DtorCounter* dtorCounter2 = new DtorCounter{ &counter };
|
||||
auto dtorCounter1 = new DtorCounter{ &counter };
|
||||
auto dtorCounter2 = new DtorCounter{ &counter };
|
||||
|
||||
ThreadContext context = {"Test"};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user