avoid string copy in redirect_path

This commit is contained in:
Chloe committed 2025-01-17 14:55:05 -07:00
1 parent 1583f259b9
commit f9e30e549a
1 file changed
+2 -2
+2 -2
View File
@@ -265,8 +265,8 @@ JNIEXPORT int JNICALL Java_com_geode_launcher_LauncherFix_performExceptionsRenam
} }
std::string redirect_path(const char* pathname) { std::string redirect_path(const char* pathname) {
auto data_path = DataPaths::get_instance().data_path; auto& data_path = DataPaths::get_instance().data_path;
auto original_data_path = DataPaths::get_instance().original_data_path; auto& original_data_path = DataPaths::get_instance().original_data_path;
if (!data_path.empty() && !original_data_path.empty()) { if (!data_path.empty() && !original_data_path.empty()) {
// call this a c string optimization // call this a c string optimization