summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cppc4group.cpp8
-rw-r--r--src/cppc4group.hpp6
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);