Skip to content

Commit

Permalink
fix auto_causes_copy of coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Jul 6, 2024
1 parent ef7f4a8 commit 47976c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,26 @@ namespace vind
return std::filesystem::path(root_path) ;
} () ;
#else
static const auto path = MODULE_PATH().parent_path() ;
static const auto& path = MODULE_PATH().parent_path() ;
#endif
return path ;
}

const std::filesystem::path& ROOT_PATH() {
static const auto path = is_installer_used() ? HOME_PATH() / ".win-vind" : MODULE_ROOT_PATH() ;
static const auto& path = is_installer_used() ? HOME_PATH() / ".win-vind" : MODULE_ROOT_PATH() ;
return path ;
}

const std::filesystem::path& CONFIG_PATH() {
static const auto path = is_installer_used() ? ROOT_PATH() : ROOT_PATH() / "config" ;
static const auto& path = is_installer_used() ? ROOT_PATH() : ROOT_PATH() / "config" ;
return path ;
}

const std::filesystem::path& RESOURCE_ROOT_PATH() {
#if defined(DEBUG)
static const auto path = MODULE_ROOT_PATH() / "res" / "resources" ;
static const auto& path = MODULE_ROOT_PATH() / "res" / "resources" ;
#else
static const auto path = MODULE_ROOT_PATH() / "resources" ;
static const auto& path = MODULE_ROOT_PATH() / "resources" ;
#endif
return path ;
}
Expand Down

0 comments on commit 47976c8

Please sign in to comment.