summaryrefslogtreecommitdiff
path: root/tools/aapt/AaptXml.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-11-03 11:21:19 -0800
committerAdam Lesinski <adamlesinski@google.com>2014-11-03 11:49:47 -0800
commit4bf58108d442b37ab4adf5ce3a4ecd63472ce254 (patch)
tree2b6359ad85861bf339e6a45813c599ab683fc7c3 /tools/aapt/AaptXml.cpp
parente8d9810cdef5b3e288f54f42adc3205532343406 (diff)
Fix issues that will be present in C++11
- char16_t is a distinct type, so stay consistent with it throughout the code base. - char16_t is defined as minimum size of 16 bits. Since we mmap and cast data structures onto raw memory, we need a precise definition (uint16_t), so we cast between that (and static_assert that they are the same size). Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
Diffstat (limited to 'tools/aapt/AaptXml.cpp')
-rw-r--r--tools/aapt/AaptXml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aapt/AaptXml.cpp b/tools/aapt/AaptXml.cpp
index 708e4054e63a..b04a55d91b9c 100644
--- a/tools/aapt/AaptXml.cpp
+++ b/tools/aapt/AaptXml.cpp
@@ -41,7 +41,7 @@ static String8 getStringAttributeAtIndex(const ResXMLTree& tree, ssize_t attrInd
}
size_t len;
- const uint16_t* str = tree.getAttributeStringValue(attrIndex, &len);
+ const char16_t* str = tree.getAttributeStringValue(attrIndex, &len);
return str ? String8(str, len) : String8();
}
@@ -103,7 +103,7 @@ String8 getResolvedAttribute(const ResTable& resTable, const ResXMLTree& tree,
if (tree.getAttributeValue(idx, &value) != NO_ERROR) {
if (value.dataType == Res_value::TYPE_STRING) {
size_t len;
- const uint16_t* str = tree.getAttributeStringValue(idx, &len);
+ const char16_t* str = tree.getAttributeStringValue(idx, &len);
return str ? String8(str, len) : String8();
}
resTable.resolveReference(&value, 0);