diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-04-22 13:04:56 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-04-22 13:04:56 +0200 |
| commit | ea60465d4a5baf3c530c58b216504717a94799cf (patch) | |
| tree | 58643b0e09406acd9a4585a48dc27b2e0415aa0e | |
| parent | 41eabf6ac74a7c0e81912742764ebea3d0e1fe07 (diff) | |
| download | cc4group-ea60465d4a5baf3c530c58b216504717a94799cf.tar.gz cc4group-ea60465d4a5baf3c530c58b216504717a94799cf.zip | |
Add lazy argument to CppC4Group's constructor (forgot it first, oops)
| -rw-r--r-- | src/cppc4group.cpp | 8 | ||||
| -rw-r--r-- | src/cppc4group.hpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cppc4group.cpp b/src/cppc4group.cpp index 71d9e0d..2355aa6 100644 --- a/src/cppc4group.cpp +++ b/src/cppc4group.cpp @@ -171,9 +171,9 @@ namespace { } } -CppC4Group::CppC4Group() : p{new Private{}} +CppC4Group::CppC4Group(const bool lazy) : p{new Private{}} { - + cc4group.setLazy(p->g, lazy); } CppC4Group::CppC4Group(CppC4Group&& other) : p{std::move(other.p)} @@ -354,7 +354,7 @@ namespace { } }; -std::optional<CppC4Group::EntryInfo> CppC4Group::getEntryInfo(const std::string& path, bool lazy) +std::optional<CppC4Group::EntryInfo> CppC4Group::getEntryInfo(const std::string& path, const bool lazy) { CC4Group_EntryInfo info; if(cc4group.getEntryInfo(p->g, path.c_str(), &info, lazy)) @@ -369,7 +369,7 @@ std::optional<CppC4Group::EntryInfo> CppC4Group::getEntryInfo(const std::string& } } -std::optional<std::vector<CppC4Group::EntryInfo>> CppC4Group::getEntryInfos(const std::string& path, bool lazy) +std::optional<std::vector<CppC4Group::EntryInfo>> CppC4Group::getEntryInfos(const std::string& path, const bool lazy) { CC4Group_EntryInfo* infos; size_t infoCount; diff --git a/src/cppc4group.hpp b/src/cppc4group.hpp index e69f9c2..420893c 100644 --- a/src/cppc4group.hpp +++ b/src/cppc4group.hpp @@ -126,7 +126,7 @@ public: public: // the constructor will automatically construct an internal CC4Group, so no new-equivalent method is needed // may throw std::bad_alloc if the allocation and construction of the internal CC4Group object fails - CppC4Group(); + CppC4Group(const bool lazy = true); // the move constructor is needed to move the returned group out of the optional from openAsChild CppC4Group(CppC4Group&& other); @@ -161,8 +161,8 @@ public: bool setOfficial(const bool official, const std::string& path = "", const bool recursive = false); bool setExecutable(const bool executable, const std::string& path); - std::optional<EntryInfo> getEntryInfo(const std::string& path = "", bool lazy = false); - std::optional<std::vector<EntryInfo>> getEntryInfos(const std::string& path = "", bool lazy = false); + std::optional<EntryInfo> getEntryInfo(const std::string& path = "", const bool lazy = false); + std::optional<std::vector<EntryInfo>> getEntryInfos(const std::string& path = "", const bool lazy = false); bool deleteEntry(const std::string& path, const bool recursive = false); bool renameEntry(const std::string& oldPath, const std::string& newPath); |
