Skip to content

Commit b00b5c2

Browse files
committed
optimize addpathtosyspath
1 parent 48d435c commit b00b5c2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Source/UnrealEnginePython/Private/UnrealEnginePython.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void FUnrealEnginePythonModule::RunFile(char *filename) {
174174
Py_DECREF(eval_ret);
175175
}
176176

177-
void FUnrealEnginePythonModule::AddPathToSysPath(FString Path)
177+
void FUnrealEnginePythonModule::AddPathToSysPath(const FString& Path)
178178
{
179179
PyObject *py_sys = PyImport_ImportModule("sys");
180180
PyObject *py_sys_dict = PyModule_GetDict(py_sys);

‎Source/UnrealEnginePython/Public/UnrealEnginePython.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface
4141
return FModuleManager::Get().IsModuleLoaded("UnrealEnginePython");
4242
}
4343

44-
//Add specified folder to the systems path (e.g. from external plugins or projects)
45-
void AddPathToSysPath(FString Path);
44+
//Add specified folder to the python systems path (e.g. from external plugins or projects allowing modular python plugin script content)
45+
void AddPathToSysPath(const FString& Path);
4646

4747
private:
4848
void *ue_python_gil;

0 commit comments

Comments
 (0)