Remove VectorToJStringArray

This commit is contained in:
Sintendo 2025-12-26 21:57:28 +01:00
parent 972ec95cb3
commit 60ca0626df
4 changed files with 5 additions and 9 deletions

View File

@ -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)

View File

@ -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());
}
}

View File

@ -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(

View File

@ -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