Make ImageWriter and PatchOat helper classes nested.
Nested classes are better for encapsulation. For example,
we've had an art::FixupRootVisitor in both image_writer.cc
and patchoat.cc and we didn't get an ODR violation only
because these two files are never used in the same process.
Test: Rely on the TreeHugger.
Change-Id: I39a86994923a9c0faa5f05d8c9ede982ce9c0c4c
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h
index e7a3e91..a519631 100644
--- a/patchoat/patchoat.h
+++ b/patchoat/patchoat.h
@@ -230,10 +230,11 @@
TimingLogger* timings_;
- friend class FixupRootVisitor;
- friend class RelocatedPointerVisitor;
- friend class PatchOatArtFieldVisitor;
- friend class PatchOatArtMethodVisitor;
+ class FixupRootVisitor;
+ class RelocatedPointerVisitor;
+ class PatchOatArtFieldVisitor;
+ class PatchOatArtMethodVisitor;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PatchOat);
};