AAPT2: Rename to match new style
Use Google3 naming style to match new
projects' and open source google projects' style.
Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.
Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
diff --git a/tools/aapt2/io/ZipArchive.h b/tools/aapt2/io/ZipArchive.h
index e04525f..85ca1ae 100644
--- a/tools/aapt2/io/ZipArchive.h
+++ b/tools/aapt2/io/ZipArchive.h
@@ -17,12 +17,13 @@
#ifndef AAPT_IO_ZIPARCHIVE_H
#define AAPT_IO_ZIPARCHIVE_H
+#include "ziparchive/zip_archive.h"
+
+#include <map>
+
#include "io/File.h"
#include "util/StringPiece.h"
-#include <ziparchive/zip_archive.h>
-#include <map>
-
namespace aapt {
namespace io {
@@ -36,13 +37,13 @@
public:
ZipFile(ZipArchiveHandle handle, const ZipEntry& entry, const Source& source);
- std::unique_ptr<IData> openAsData() override;
- const Source& getSource() const override;
+ std::unique_ptr<IData> OpenAsData() override;
+ const Source& GetSource() const override;
private:
- ZipArchiveHandle mZipHandle;
- ZipEntry mZipEntry;
- Source mSource;
+ ZipArchiveHandle zip_handle_;
+ ZipEntry zip_entry_;
+ Source source_;
};
class ZipFileCollection;
@@ -51,11 +52,11 @@
public:
explicit ZipFileCollectionIterator(ZipFileCollection* collection);
- bool hasNext() override;
- io::IFile* next() override;
+ bool HasNext() override;
+ io::IFile* Next() override;
private:
- std::map<std::string, std::unique_ptr<IFile>>::const_iterator mCurrent, mEnd;
+ std::map<std::string, std::unique_ptr<IFile>>::const_iterator current_, end_;
};
/**
@@ -63,11 +64,11 @@
*/
class ZipFileCollection : public IFileCollection {
public:
- static std::unique_ptr<ZipFileCollection> create(const StringPiece& path,
+ static std::unique_ptr<ZipFileCollection> Create(const StringPiece& path,
std::string* outError);
- io::IFile* findFile(const StringPiece& path) override;
- std::unique_ptr<IFileCollectionIterator> iterator() override;
+ io::IFile* FindFile(const StringPiece& path) override;
+ std::unique_ptr<IFileCollectionIterator> Iterator() override;
~ZipFileCollection() override;
@@ -75,8 +76,8 @@
friend class ZipFileCollectionIterator;
ZipFileCollection();
- ZipArchiveHandle mHandle;
- std::map<std::string, std::unique_ptr<IFile>> mFiles;
+ ZipArchiveHandle handle_;
+ std::map<std::string, std::unique_ptr<IFile>> files_;
};
} // namespace io