mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
refactor
This commit is contained in:
parent
5e55e20ec4
commit
d745a34657
33 changed files with 209 additions and 205 deletions
|
|
@ -132,7 +132,7 @@ std::filesystem::path EnginePaths::getSettingsFile() const {
|
|||
return userFilesFolder / SETTINGS_FILE;
|
||||
}
|
||||
|
||||
std::vector<std::filesystem::path> EnginePaths::scanForWorlds() {
|
||||
std::vector<std::filesystem::path> EnginePaths::scanForWorlds() const {
|
||||
std::vector<std::filesystem::path> folders;
|
||||
|
||||
auto folder = getWorldsFolder();
|
||||
|
|
@ -189,7 +189,7 @@ std::tuple<std::string, std::string> EnginePaths::parsePath(std::string_view pat
|
|||
|
||||
std::filesystem::path EnginePaths::resolve(
|
||||
const std::string& path, bool throwErr
|
||||
) {
|
||||
) const {
|
||||
auto [prefix, filename] = EnginePaths::parsePath(path);
|
||||
if (prefix.empty()) {
|
||||
throw files_access_error("no entry point specified");
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ public:
|
|||
|
||||
void setContentPacks(std::vector<ContentPack>* contentPacks);
|
||||
|
||||
std::vector<std::filesystem::path> scanForWorlds();
|
||||
std::vector<std::filesystem::path> scanForWorlds() const;
|
||||
|
||||
std::filesystem::path resolve(const std::string& path, bool throwErr = true);
|
||||
std::filesystem::path resolve(const std::string& path, bool throwErr = true) const;
|
||||
|
||||
static std::tuple<std::string, std::string> parsePath(std::string_view view);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue