summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-04-03 12:08:26 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-04-03 12:33:02 -0700
commitca2fc353c2b07e24e297fdc8426c7abd601d908b (patch)
tree2f9242af3558209ac265fb7d2d1164652f78d8de /tools/aapt2/ResourceTable.cpp
parent7e3a19ac85d30abade971d8d0a948b4599d97c9e (diff)
Fix windows build of AAPT2
Change-Id: Ib8e1a4322510b582e9600a08d3118842c9abc73c
Diffstat (limited to 'tools/aapt2/ResourceTable.cpp')
-rw-r--r--tools/aapt2/ResourceTable.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index 0b3dd78f2d29..794090d0b74c 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -164,7 +164,7 @@ bool ResourceTable::addResource(const ResourceNameRef& name, const ResourceId re
<< "' has invalid entry name '"
<< name.entry
<< "'. Invalid character '"
- << *badCharIter
+ << StringPiece16(badCharIter, 1)
<< "'."
<< std::endl;
return false;
@@ -258,7 +258,7 @@ bool ResourceTable::markPublic(const ResourceNameRef& name, const ResourceId res
<< "' has invalid entry name '"
<< name.entry
<< "'. Invalid character '"
- << *badCharIter
+ << StringPiece16(badCharIter, 1)
<< "'."
<< std::endl;
return false;
@@ -314,21 +314,21 @@ bool ResourceTable::markPublic(const ResourceNameRef& name, const ResourceId res
std::tuple<const ResourceTableType*, const ResourceEntry*>
ResourceTable::findResource(const ResourceNameRef& name) const {
if (name.package != mPackage) {
- return {nullptr, nullptr};
+ return {};
}
auto iter = std::lower_bound(mTypes.begin(), mTypes.end(), name.type, lessThanType);
if (iter == mTypes.end() || (*iter)->type != name.type) {
- return {nullptr, nullptr};
+ return {};
}
const std::unique_ptr<ResourceTableType>& type = *iter;
auto iter2 = std::lower_bound(type->entries.begin(), type->entries.end(), name.entry,
lessThanEntry);
if (iter2 == type->entries.end() || name.entry != (*iter2)->name) {
- return {nullptr, nullptr};
+ return {};
}
- return {iter->get(), iter2->get()};
+ return std::make_tuple(iter->get(), iter2->get());
}
} // namespace aapt