diff --git a/android/jni/com/mapswithme/maps/ugc/UGC.cpp b/android/jni/com/mapswithme/maps/ugc/UGC.cpp index 10df072f54..0ce4f93da3 100644 --- a/android/jni/com/mapswithme/maps/ugc/UGC.cpp +++ b/android/jni/com/mapswithme/maps/ugc/UGC.cpp @@ -87,7 +87,8 @@ public: jobjectArray jratings = static_cast(env->GetObjectField(ugcUpdate, m_ratingArrayFieldId)); int const length = env->GetArrayLength(jratings); - std::vector records(length); + std::vector records; + records.reserve(length); for (int i = 0; i < length; i++) { jobject jrating = env->GetObjectArrayElement(jratings, i);