diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-09-16 14:43:29 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2014-10-23 10:39:31 -0700 |
commit | 40e8eefbedcafc51948945647d746daaee092f16 (patch) | |
tree | eb14bacf3510fc8865145a1c68b4dcb8fc802904 /tools/aapt/ResourceIdCache.cpp | |
parent | 74af6700196ed55a0aa39c7777293e735e7b4d73 (diff) |
First commit of split-select tool
This tool emits a set of rules as JSON for when a Split APK
should match a target device.
Change-Id: I8bfbdfbdb51efcfc645889dd03e1961f16e39645
Diffstat (limited to 'tools/aapt/ResourceIdCache.cpp')
-rw-r--r-- | tools/aapt/ResourceIdCache.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/aapt/ResourceIdCache.cpp b/tools/aapt/ResourceIdCache.cpp index d60a07fc243b..8835fb0130a3 100644 --- a/tools/aapt/ResourceIdCache.cpp +++ b/tools/aapt/ResourceIdCache.cpp @@ -9,8 +9,6 @@ #include <utils/Log.h> #include "ResourceIdCache.h" #include <map> -using namespace std; - static size_t mHits = 0; static size_t mMisses = 0; @@ -29,7 +27,7 @@ struct CacheEntry { CacheEntry(const android::String16& name, uint32_t resId) : hashedName(name), id(resId) { } }; -static map< uint32_t, CacheEntry > mIdMap; +static std::map< uint32_t, CacheEntry > mIdMap; // djb2; reasonable choice for strings when collisions aren't particularly important @@ -63,7 +61,7 @@ uint32_t ResourceIdCache::lookup(const android::String16& package, bool onlyPublic) { const String16 hashedName = makeHashableName(package, type, name, onlyPublic); const uint32_t hashcode = hash(hashedName); - map<uint32_t, CacheEntry>::iterator item = mIdMap.find(hashcode); + std::map<uint32_t, CacheEntry>::iterator item = mIdMap.find(hashcode); if (item == mIdMap.end()) { // cache miss mMisses++; |