forked from organicmaps/organicmaps
[android] Added std:: prefixes in JNI to fix android build
This commit is contained in:
parent
63b6375f7c
commit
38ea5daee4
5 changed files with 10 additions and 10 deletions
|
@ -76,10 +76,10 @@ jobjectArray ToJavaArray(JNIEnv * env, jclass clazz, TIt begin, TIt end, size_t
|
|||
template<typename TContainer, typename TToJavaFn>
|
||||
jobjectArray ToJavaArray(JNIEnv * env, jclass clazz, TContainer const & src, TToJavaFn && toJavaFn)
|
||||
{
|
||||
return ToJavaArray(env, clazz, begin(src), end(src), src.size(), forward<TToJavaFn>(toJavaFn));
|
||||
return ToJavaArray(env, clazz, begin(src), end(src), src.size(), std::forward<TToJavaFn>(toJavaFn));
|
||||
}
|
||||
|
||||
jobjectArray ToJavaStringArray(JNIEnv * env, vector<string> const & src);
|
||||
jobjectArray ToJavaStringArray(JNIEnv * env, std::vector<std::string> const & src);
|
||||
|
||||
void DumpDalvikReferenceTables();
|
||||
} // namespace jni
|
||||
|
|
|
@ -49,7 +49,7 @@ Java_com_mapswithme_maps_editor_OsmOAuth_nativeAuthWithPassword(JNIEnv * env, jc
|
|||
return ToStringArray(env, auth.GetKeySecret());
|
||||
LOG(LWARNING, ("nativeAuthWithPassword: invalid login or password."));
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("nativeAuthWithPassword error ", ex.what()));
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ Java_com_mapswithme_maps_editor_OsmOAuth_nativeAuthWithWebviewToken(JNIEnv * env
|
|||
TKeySecret const ks = auth.FinishAuthorization(rt, ToNativeString(env, verifier));
|
||||
return ToStringArray(env, ks);
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("nativeAuthWithWebviewToken error ", ex.what()));
|
||||
return nullptr;
|
||||
|
@ -82,7 +82,7 @@ Java_com_mapswithme_maps_editor_OsmOAuth_nativeGetFacebookAuthUrl(JNIEnv * env,
|
|||
OsmOAuth::TUrlRequestToken const uks = OsmOAuth::ServerAuth().GetFacebookOAuthURL();
|
||||
return ToStringArray(env, uks);
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("nativeGetFacebookAuthUrl error ", ex.what()));
|
||||
return nullptr;
|
||||
|
@ -97,7 +97,7 @@ Java_com_mapswithme_maps_editor_OsmOAuth_nativeGetGoogleAuthUrl(JNIEnv * env, jc
|
|||
OsmOAuth::TUrlRequestToken const uks = OsmOAuth::ServerAuth().GetGoogleOAuthURL();
|
||||
return ToStringArray(env, uks);
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("nativeGetGoogleAuthUrl error ", ex.what()));
|
||||
return nullptr;
|
||||
|
@ -113,7 +113,7 @@ Java_com_mapswithme_maps_editor_OsmOAuth_nativeGetOsmUsername(JNIEnv * env, jcla
|
|||
ServerApi06 const api(OsmOAuth::ServerAuth(keySecret));
|
||||
return jni::ToJavaString(env, api.GetUserPreferences().m_displayName);
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("Can't load user preferences from server: ", ex.what()));
|
||||
return nullptr;
|
||||
|
|
|
@ -48,7 +48,7 @@ int ConfigComparator::configAlphaSize(EGLConfig const & config) const
|
|||
namespace
|
||||
{
|
||||
|
||||
string GetEglError(EGLint error)
|
||||
std::string GetEglError(EGLint error)
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ Java_com_mapswithme_maps_downloader_ChunkTask_nativeOnWrite(JNIEnv * env, jclass
|
|||
{
|
||||
ret = cb->OnWrite(beg, buf, size);
|
||||
}
|
||||
catch (exception const & ex)
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LERROR, ("Failed to write chunk:", ex.what()));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ Java_com_mapswithme_util_StringUtils_nativeFilterContainsNormalized(JNIEnv * env
|
|||
{
|
||||
string substr = jni::ToNativeString(env, jSubstr);
|
||||
int const length = env->GetArrayLength(src);
|
||||
vector<string> filtered;
|
||||
std::vector<string> filtered;
|
||||
filtered.reserve(length);
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue