idmap2: fix clang-tidy warnings [modernize-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I8768169fb7b541eb6b1aa3311c46a710eb71aac9
diff --git a/cmds/idmap2/tests/IdmapTests.cpp b/cmds/idmap2/tests/IdmapTests.cpp
index dc80e0e..963f22e 100644
--- a/cmds/idmap2/tests/IdmapTests.cpp
+++ b/cmds/idmap2/tests/IdmapTests.cpp
@@ -37,8 +37,7 @@
using ::testing::IsNull;
using ::testing::NotNull;
-namespace android {
-namespace idmap2 {
+namespace android::idmap2 {
TEST(IdmapTests, TestCanonicalIdmapPathFor) {
ASSERT_EQ(Idmap::CanonicalIdmapPathFor("/foo", "/vendor/overlay/bar.apk"),
@@ -346,23 +345,23 @@
explicit TestVisitor(std::ostream& stream) : stream_(stream) {
}
- void visit(const Idmap& idmap ATTRIBUTE_UNUSED) {
+ void visit(const Idmap& idmap ATTRIBUTE_UNUSED) override {
stream_ << "TestVisitor::visit(Idmap)" << std::endl;
}
- void visit(const IdmapHeader& idmap ATTRIBUTE_UNUSED) {
+ void visit(const IdmapHeader& idmap ATTRIBUTE_UNUSED) override {
stream_ << "TestVisitor::visit(IdmapHeader)" << std::endl;
}
- void visit(const IdmapData& idmap ATTRIBUTE_UNUSED) {
+ void visit(const IdmapData& idmap ATTRIBUTE_UNUSED) override {
stream_ << "TestVisitor::visit(IdmapData)" << std::endl;
}
- void visit(const IdmapData::Header& idmap ATTRIBUTE_UNUSED) {
+ void visit(const IdmapData::Header& idmap ATTRIBUTE_UNUSED) override {
stream_ << "TestVisitor::visit(IdmapData::Header)" << std::endl;
}
- void visit(const IdmapData::TypeEntry& idmap ATTRIBUTE_UNUSED) {
+ void visit(const IdmapData::TypeEntry& idmap ATTRIBUTE_UNUSED) override {
stream_ << "TestVisitor::visit(IdmapData::TypeEntry)" << std::endl;
}
@@ -391,5 +390,4 @@
"TestVisitor::visit(IdmapData::TypeEntry)\n");
}
-} // namespace idmap2
-} // namespace android
+} // namespace android::idmap2