diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-08 01:34:47 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-08 01:34:47 +0200 |
commit | 7f9a9a8241ba81be9213e6606b8be4a48f1cbaab (patch) | |
tree | 26b67f150ec1b43593343344eabdc7deca47d0d8 /src/openvic/dataloader/Dataloader.hpp | |
parent | 3cd1d62ec00690a1b29070dd4903754e8f089a21 (diff) |
Remove return_t, use & instead of if(x != SUCCESS)
Diffstat (limited to 'src/openvic/dataloader/Dataloader.hpp')
-rw-r--r-- | src/openvic/dataloader/Dataloader.hpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/openvic/dataloader/Dataloader.hpp b/src/openvic/dataloader/Dataloader.hpp index 9e5c24b..f723803 100644 --- a/src/openvic/dataloader/Dataloader.hpp +++ b/src/openvic/dataloader/Dataloader.hpp @@ -4,8 +4,6 @@ #include <functional> #include <vector> -#include "openvic/types/Return.hpp" - namespace OpenVic { struct GameManager; struct PopManager; @@ -14,24 +12,24 @@ namespace OpenVic { class Dataloader { std::vector<std::filesystem::path> roots; - return_t _load_pop_types(PopManager& pop_manager, std::filesystem::path const& pop_type_directory) const; - return_t _load_map_dir(Map& map, std::filesystem::path const& map_directory) const; + bool _load_pop_types(PopManager& pop_manager, std::filesystem::path const& pop_type_directory) const; + bool _load_map_dir(Map& map, std::filesystem::path const& map_directory) const; public: Dataloader() = default; /* In reverse-load order, so base defines first and final loaded mod last */ - return_t set_roots(std::vector<std::filesystem::path> new_roots); + bool set_roots(std::vector<std::filesystem::path> new_roots); std::filesystem::path lookup_file(std::filesystem::path const& path) const; static const std::filesystem::path TXT; std::vector<std::filesystem::path> lookup_files_in_dir(std::filesystem::path const& path, std::filesystem::path const* extension = &TXT) const; - return_t apply_to_files_in_dir(std::filesystem::path const& path, - std::function<return_t(std::filesystem::path const&)> callback, + bool apply_to_files_in_dir(std::filesystem::path const& path, + std::function<bool(std::filesystem::path const&)> callback, std::filesystem::path const* extension = &TXT) const; - return_t load_defines(GameManager& game_manager) const; - return_t load_pop_history(GameManager& game_manager, std::filesystem::path const& path) const; + bool load_defines(GameManager& game_manager) const; + bool load_pop_history(GameManager& game_manager, std::filesystem::path const& path) const; }; } |