idmap2: fix cpplint warnings
Bug: 189963636
Test: frameworks/base/cmds/idmap2/static-checks.sh
Change-Id: I6da18cdbbd2fc33db711696445230a9f316dc143
diff --git a/cmds/idmap2/tests/FabricatedOverlayTests.cpp b/cmds/idmap2/tests/FabricatedOverlayTests.cpp
index 79ab243..468ea0c 100644
--- a/cmds/idmap2/tests/FabricatedOverlayTests.cpp
+++ b/cmds/idmap2/tests/FabricatedOverlayTests.cpp
@@ -19,6 +19,7 @@
#include <idmap2/FabricatedOverlay.h>
#include <fstream>
+#include <utility>
namespace android::idmap2 {
@@ -135,4 +136,4 @@
EXPECT_EQ(Res_value::TYPE_INT_DEC, entry->data_type);
}
-} // namespace android::idmap2
\ No newline at end of file
+} // namespace android::idmap2
diff --git a/cmds/idmap2/tests/IdmapTests.cpp b/cmds/idmap2/tests/IdmapTests.cpp
index 9516ff8..9c6402a 100644
--- a/cmds/idmap2/tests/IdmapTests.cpp
+++ b/cmds/idmap2/tests/IdmapTests.cpp
@@ -83,7 +83,7 @@
std::stringstream stream;
stream << android::kIdmapMagic;
stream << 0xffffffffU;
- stream << std::string(kJunkSize, (char)0xffU);
+ stream << std::string(kJunkSize, static_cast<char>(0xffU));
ASSERT_FALSE(Idmap::FromBinaryStream(stream));
}
@@ -92,7 +92,7 @@
std::stringstream stream;
stream << 0xffffffffU;
stream << android::kIdmapCurrentVersion;
- stream << std::string(kJunkSize, (char)0xffU);
+ stream << std::string(kJunkSize, static_cast<char>(0xffU));
ASSERT_FALSE(Idmap::FromBinaryStream(stream));
}
diff --git a/cmds/idmap2/tests/R.h b/cmds/idmap2/tests/R.h
index ac9b058..89219c9 100644
--- a/cmds/idmap2/tests/R.h
+++ b/cmds/idmap2/tests/R.h
@@ -66,8 +66,8 @@
constexpr ResourceId str1 = 0x7f02000b;
constexpr ResourceId str3 = 0x7f02000c;
constexpr ResourceId str4 = 0x7f02000d;
- }
-}
+ } // namespace string
+} // namespace R::overlay
// clang-format on
} // namespace android::idmap2