11-12-2012, 07:28 AM
It worked
I changed it to this
thanks
I changed it to this
void cFastNBTWriter::AddIntArray(const AString & a_Name, const int * a_Value, size_t a_NumElements) { TagCommon(a_Name, TAG_IntArray); Int32 len = htonl(a_NumElements); m_Result.append((const char *)&len, 4); #if defined(ANDROID_NDK) m_Result.append(a_NumElements * 4, (char)0); for (size_t i = 0; i < a_NumElements; i++) { int Element = htonl(a_Value[i]); m_Result.append((const char *)&Element, 4); } #else int * Elements = (int *)(m_Result.data() + m_Result.size()); m_Result.append(a_NumElements * 4, (char)0); for (size_t i = 0; i < a_NumElements; i++) { Elements[i] = htonl(a_Value[i]); } #endif }
thanks