Use char16_t for char things.
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.
Change-Id: I052b6176ced635162920b31560052d9a64f92764
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 4d29ff7..f842bee 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -250,7 +250,7 @@
ssize_t minSdkIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE,
"minSdkVersion");
if (minSdkIndex >= 0) {
- const uint16_t* minSdk16 = block.getAttributeStringValue(minSdkIndex, &len);
+ const char16_t* minSdk16 = block.getAttributeStringValue(minSdkIndex, &len);
const char* minSdk8 = strdup(String8(minSdk16).string());
bundle->setManifestMinSdkVersion(minSdk8);
}
@@ -456,7 +456,7 @@
size_t len;
ssize_t index = parser.indexOfAttribute(ns, attr);
- const uint16_t* str;
+ const char16_t* str;
Res_value value;
if (index >= 0 && parser.getAttributeValue(index, &value) >= 0) {
const ResStringPool* pool = &parser.getStrings();
@@ -1422,7 +1422,7 @@
}
size_t len;
ssize_t index = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE, "name");
- const uint16_t* id = block.getAttributeStringValue(index, &len);
+ const char16_t* id = block.getAttributeStringValue(index, &len);
if (id == NULL) {
fprintf(stderr, "%s:%d: missing name attribute in element <%s>.\n",
manifestPath.string(), block.getLineNumber(),
@@ -1465,7 +1465,7 @@
hasErrors = true;
}
syms->addStringSymbol(String8(e), idStr, srcPos);
- const uint16_t* cmt = block.getComment(&len);
+ const char16_t* cmt = block.getComment(&len);
if (cmt != NULL && *cmt != 0) {
//printf("Comment of %s: %s\n", String8(e).string(),
// String8(cmt).string());