aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-12-25 23:12:51 +0100
committerlonkaars <loek@pipeframe.xyz>2022-12-25 23:12:51 +0100
commitabad89cbb44744d02964eb3d3a56f7227dc7e5cf (patch)
tree950d446aeb370644f1cb4b5666cddd3091a73e0f
parent32f38a285afcf54e83e517e5e46bcff88c0000f6 (diff)
fix segfault by refactor
-rw-r--r--oop2eindopdr/CacheManager.cpp1
-rw-r--r--oop2eindopdr/CacheManager.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/oop2eindopdr/CacheManager.cpp b/oop2eindopdr/CacheManager.cpp
index ff996af..c335de3 100644
--- a/oop2eindopdr/CacheManager.cpp
+++ b/oop2eindopdr/CacheManager.cpp
@@ -8,6 +8,7 @@
#include <thread>
#include <chrono>
+CacheManager::CacheManager(const char* cache_path) : CacheManager(std::string(cache_path)) { }
CacheManager::CacheManager(std::string cache_path) {
this->cache_path = cache_path;
this->verify_cache();
diff --git a/oop2eindopdr/CacheManager.h b/oop2eindopdr/CacheManager.h
index 2aa8a39..a4f6958 100644
--- a/oop2eindopdr/CacheManager.h
+++ b/oop2eindopdr/CacheManager.h
@@ -36,8 +36,8 @@ private:
virtual void retry_if(std::string label, std::function<void()> action, std::function<bool()> retry_if) { retry(label, true, action, retry_if); };
public:
/** @brief initialize CacheManager class at `cache_path` */
+ CacheManager(const char* cache_path);
CacheManager(std::string cache_path);
- CacheManager(const char* cache_path) { CacheManager(std::string(cache_path)); };
/** @brief close cache */
virtual ~CacheManager();
/** @brief create cache folder structure */