summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-09 04:15:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-09 04:15:29 +0000
commit5a6934c07946743e622df52ba1155d97129b37f0 (patch)
treef8a752f2548751966afff9416bdfe0cfd7695abe
parent294ce05e23a96353c8ddf934428bc60d1395b9a5 (diff)
parent1c6c7573e9ffa95058adc9d185d205b1e59b3d70 (diff)
downloadbase-5a6934c07946743e622df52ba1155d97129b37f0.tar.gz
Merge "Don't pollute the namespace for two uses."
-rw-r--r--tools/aapt/ResourceIdCache.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/aapt/ResourceIdCache.cpp b/tools/aapt/ResourceIdCache.cpp
index e03f4f668a1e..359443d8fca0 100644
--- a/tools/aapt/ResourceIdCache.cpp
+++ b/tools/aapt/ResourceIdCache.cpp
@@ -9,7 +9,6 @@
#include <utils/Log.h>
#include "ResourceIdCache.h"
#include <map>
-using namespace std;
static size_t mHits = 0;
@@ -29,7 +28,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 +62,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++;