X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/af91d419f0fc552d1969b6b7d354fca2bc3e36ed..0570e6afc60b9adbab880e4a646cf583b47ddec1:/StringPool.cpp diff --git a/StringPool.cpp b/StringPool.cpp index 963ae59..839eda5 100644 --- a/StringPool.cpp +++ b/StringPool.cpp @@ -9,6 +9,7 @@ #include #include +#include #if HAVE_PRINTF_ZD # define ZD "%zd" @@ -213,11 +214,11 @@ status_t StringPool::addStyleSpan(size_t idx, const entry_style_span& span) return NO_ERROR; } -int StringPool::config_sort(const size_t* lhs, const size_t* rhs, void* state) +int StringPool::config_sort(void* state, const void* lhs, const void* rhs) { StringPool* pool = (StringPool*)state; - const entry& lhe = pool->mEntries[pool->mEntryArray[*lhs]]; - const entry& rhe = pool->mEntries[pool->mEntryArray[*rhs]]; + const entry& lhe = pool->mEntries[pool->mEntryArray[*static_cast(lhs)]]; + const entry& rhe = pool->mEntries[pool->mEntryArray[*static_cast(rhs)]]; return lhe.compare(rhe); } @@ -232,13 +233,17 @@ void StringPool::sortByConfig() // At that point it maps from the new position in the array to the // original position the entry appeared. Vector newPosToOriginalPos; - for (size_t i=0; i