diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-08-12 11:35:17 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2016-08-12 11:44:16 -0700 |
commit | b3d46b44a399ba0a9b14caac8603db15089ab55b (patch) | |
tree | 94e2f4c534e4ae9b80dce102aa1f1b3fce89ac5c /tools/aapt/Resource.cpp | |
parent | ed935c32f478229220a90442da0af3c3d3fc6230 (diff) | |
parent | 17bd236b4b6b78c32a187649aa4abcf94e5951c3 (diff) |
resolve merge conflicts of 17bd236 to stage-aosp-master
Change-Id: I08d4500aaa378b08d41e8d046c62101e08dbfba8
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r-- | tools/aapt/Resource.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index e6407332bb90..34fdf6cba3e2 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -394,7 +394,7 @@ static void collect_files(const sp<AaptDir>& dir, const DefaultKeyedVector<String8, sp<AaptGroup> >& groups = dir->getFiles(); int N = groups.size(); for (int i=0; i<N; i++) { - String8 leafName = groups.keyAt(i); + const String8& leafName = groups.keyAt(i); const sp<AaptGroup>& group = groups.valueAt(i); const DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> >& files @@ -417,7 +417,7 @@ static void collect_files(const sp<AaptDir>& dir, set->add(leafName, group); resources->add(resType, set); } else { - sp<ResourceTypeSet> set = resources->valueAt(index); + const sp<ResourceTypeSet>& set = resources->valueAt(index); index = set->indexOfKey(leafName); if (index < 0) { if (kIsDebug) { @@ -452,7 +452,7 @@ static void collect_files(const sp<AaptAssets>& ass, int N = dirs.size(); for (int i=0; i<N; i++) { - sp<AaptDir> d = dirs.itemAt(i); + const sp<AaptDir>& d = dirs.itemAt(i); if (kIsDebug) { printf("Collecting dir #%d %p: %s, leaf %s\n", i, d.get(), d->getPath().string(), d->getLeaf().string()); @@ -610,7 +610,7 @@ static bool applyFileOverlay(Bundle *bundle, // get the overlay resources of the requested type ssize_t index = overlayRes->indexOfKey(resTypeString); if (index >= 0) { - sp<ResourceTypeSet> overlaySet = overlayRes->valueAt(index); + const sp<ResourceTypeSet>& overlaySet = overlayRes->valueAt(index); // for each of the resources, check for a match in the previously built // non-overlay "baseset". @@ -760,7 +760,7 @@ bool addTagAttribute(const sp<XMLNode>& node, const char* ns8, return addTagAttribute(node, ns8, attr8, value, errorOnFailedInsert, false); } -static void fullyQualifyClassName(const String8& package, sp<XMLNode> node, +static void fullyQualifyClassName(const String8& package, const sp<XMLNode>& node, const String16& attrName) { XMLNode::attribute_entry* attr = node->editAttribute( String16("http://schemas.android.com/apk/res/android"), attrName); @@ -1345,7 +1345,7 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets, sp<ApkBuil ResourceDirIterator it(resources->valueAt(index), String8("values")); ssize_t res; while ((res=it.next()) == NO_ERROR) { - sp<AaptFile> file = it.getFile(); + const sp<AaptFile>& file = it.getFile(); res = compileResourceFile(bundle, assets, file, it.getParams(), (current!=assets), &table); if (res != NO_ERROR) { @@ -2679,7 +2679,7 @@ status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets, String8 dest(bundle->getRClassDir()); if (bundle->getMakePackageDirs()) { - String8 pkg(package); + const String8& pkg(package); const char* last = pkg.string(); const char* s = last-1; do { |