mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-30 11:03:31 +00:00
Remove VectorToJStringArray
This commit is contained in:
parent
972ec95cb3
commit
60ca0626df
@ -17,10 +17,6 @@ jstring ToJString(JNIEnv* env, std::string_view str);
|
||||
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array);
|
||||
jobjectArray SpanToJStringArray(JNIEnv* env, std::span<const std::string_view> span);
|
||||
jobjectArray SpanToJStringArray(JNIEnv* env, std::span<const std::string> span);
|
||||
inline jobjectArray VectorToJStringArray(JNIEnv* env, const std::vector<std::string>& vector)
|
||||
{
|
||||
return SpanToJStringArray(env, vector);
|
||||
}
|
||||
|
||||
template <typename T, typename F>
|
||||
jobjectArray SpanToJObjectArray(JNIEnv* env, std::span<const T> span, jclass clazz, F f)
|
||||
|
||||
@ -15,20 +15,20 @@ JNIEXPORT jobjectArray JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getShaderList(JNIEnv* env,
|
||||
jclass)
|
||||
{
|
||||
return VectorToJStringArray(env, VideoCommon::PostProcessing::GetShaderList());
|
||||
return SpanToJStringArray(env, VideoCommon::PostProcessing::GetShaderList());
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getAnaglyphShaderList(
|
||||
JNIEnv* env, jclass)
|
||||
{
|
||||
return VectorToJStringArray(env, VideoCommon::PostProcessing::GetAnaglyphShaderList());
|
||||
return SpanToJStringArray(env, VideoCommon::PostProcessing::GetAnaglyphShaderList());
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getPassiveShaderList(
|
||||
JNIEnv* env, jclass)
|
||||
{
|
||||
return VectorToJStringArray(env, VideoCommon::PostProcessing::GetPassiveShaderList());
|
||||
return SpanToJStringArray(env, VideoCommon::PostProcessing::GetPassiveShaderList());
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCach
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_model_GameFileCache_getIsoPaths(JNIEnv* env, jclass)
|
||||
{
|
||||
return VectorToJStringArray(env, Config::GetIsoPaths());
|
||||
return SpanToJStringArray(env, Config::GetIsoPaths());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_setIsoPaths(
|
||||
|
||||
@ -1173,7 +1173,7 @@ JNIEXPORT jobjectArray JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_input_model_ControllerInterface_getAllDeviceStrings(
|
||||
JNIEnv* env, jclass)
|
||||
{
|
||||
return VectorToJStringArray(env, g_controller_interface.GetAllDeviceStrings());
|
||||
return SpanToJStringArray(env, g_controller_interface.GetAllDeviceStrings());
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
|
||||
Loading…
Reference in New Issue
Block a user