[android] Compilation fix.

This commit is contained in:
Viktor 2015-07-09 04:25:31 +03:00 committed by Alex Zolotarev
parent ce92434c15
commit 5dd7e6f0b8
2 changed files with 6 additions and 5 deletions

View file

@ -4,6 +4,8 @@
#include "../maps/MapStorage.hpp"
#include "../maps/Framework.hpp"
#include "platform/country_defines.hpp"
namespace storage_utils
{
::Framework * frm();

View file

@ -76,17 +76,16 @@ extern "C"
Java_com_mapswithme_maps_MapStorage_countryRemoteSizeInBytes(JNIEnv * env, jobject thiz, jobject idx, jint options)
{
ActiveMapsLayout & layout = storage_utils::GetMapLayout();
TMapOptions opt = storage_utils::ToOptions(options);
LocalAndRemoteSizeT sizes = layout.GetRemoteCountrySizes(ToNative(idx));
switch (opt)
LocalAndRemoteSizeT const sizes = layout.GetRemoteCountrySizes(ToNative(idx));
switch (storage_utils::ToOptions(options))
{
case TMapOptions::EMap:
return sizes.first;
case TMapOptions::ECarRouting:
return sizes.second;
case EMapWithCarRouting:
case TMapOptions::EMapWithCarRouting:
return sizes.first + sizes.second;
case ENothing:
case TMapOptions::ENothing:
return 0;
}
}