summaryrefslogtreecommitdiff
path: root/tools/aapt/StringPool.h
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/StringPool.h
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/StringPool.h')
-rw-r--r--tools/aapt/StringPool.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h
index 1b3abfd9b4c6..a9c7becbe700 100644
--- a/tools/aapt/StringPool.h
+++ b/tools/aapt/StringPool.h
@@ -26,7 +26,10 @@ using namespace android;
#define PRINT_STRING_METRICS 0
-void strcpy16_htod(uint16_t* dst, const uint16_t* src);
+#if __cplusplus >= 201103L
+void strcpy16_htod(char16_t* dst, const char16_t* src);
+#endif
+void strcpy16_htod(uint16_t* dst, const char16_t* src);
void printStringPool(const ResStringPool* pool);