nvidia/vfx: Optimize by returning a const-reference

Prevents a needless deep clone of the path object.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-10-26 22:59:02 +02:00
parent 939ad35dd7
commit 39c2fdb943
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@ std::shared_ptr<::streamfx::nvidia::vfx::vfx> streamfx::nvidia::vfx::vfx::get()
return instance.lock(); return instance.lock();
} }
std::filesystem::path streamfx::nvidia::vfx::vfx::model_path() std::filesystem::path const& streamfx::nvidia::vfx::vfx::model_path()
{ {
return _model_path; return _model_path;
} }

View file

@ -71,7 +71,7 @@ namespace streamfx::nvidia::vfx {
~vfx(); ~vfx();
vfx(); vfx();
std::filesystem::path model_path(); std::filesystem::path const& model_path();
public: public:
NVVFX_DEFINE_FUNCTION(NvVFX_GetVersion, uint32_t* version); NVVFX_DEFINE_FUNCTION(NvVFX_GetVersion, uint32_t* version);