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/Io.cpp b/tools/aapt2/io/Io.cpp
index 963c21c..cab4b65 100644
--- a/tools/aapt2/io/Io.cpp
+++ b/tools/aapt2/io/Io.cpp
@@ -22,23 +22,23 @@
namespace aapt {
namespace io {
-bool copy(OutputStream* out, InputStream* in) {
- const void* inBuffer;
- int inLen;
- while (in->Next(&inBuffer, &inLen)) {
- void* outBuffer;
- int outLen;
- if (!out->Next(&outBuffer, &outLen)) {
- return !out->HadError();
- }
-
- const int bytesToCopy = std::min(inLen, outLen);
- memcpy(outBuffer, inBuffer, bytesToCopy);
- out->BackUp(outLen - bytesToCopy);
- in->BackUp(inLen - bytesToCopy);
+bool Copy(OutputStream* out, InputStream* in) {
+ const void* in_buffer;
+ int in_len;
+ while (in->Next(&in_buffer, &in_len)) {
+ void* out_buffer;
+ int out_len;
+ if (!out->Next(&out_buffer, &out_len)) {
+ return !out->HadError();
}
- return !in->HadError();
+
+ const int bytes_to_copy = std::min(in_len, out_len);
+ memcpy(out_buffer, in_buffer, bytes_to_copy);
+ out->BackUp(out_len - bytes_to_copy);
+ in->BackUp(in_len - bytes_to_copy);
+ }
+ return !in->HadError();
}
-} // namespace io
-} // namespace aapt
+} // namespace io
+} // namespace aapt