reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 6a0058b9543ee82c6a31b103a6882a150aec1b72
parent 1e3d5dff595db240c6f4850c7edcec2bfaaaa3f7
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Mon, 15 Feb 2016 21:50:36 -0500

mild refactoring

Diffstat:
Msrc/path.cpp | 2++
Msrc/path.hpp | 3+++
Msrc/reapack.cpp | 2+-
Msrc/transaction.cpp | 2+-
4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/path.cpp b/src/path.cpp @@ -33,6 +33,8 @@ static const string DOT = "."; static const string DOTDOT = ".."; const char *Path::CACHE_DIRNAME = "ReaPack"; +const char *Path::CONFIG_FILE = "reapack.ini"; +const char *Path::REGISTRY_FILE = "registry.db"; Path Path::s_root; diff --git a/src/path.hpp b/src/path.hpp @@ -26,6 +26,9 @@ class UseRootPath; class Path { public: static const char *CACHE_DIRNAME; + static const char *CONFIG_FILE; + static const char *REGISTRY_FILE; + static Path cacheDir() { return s_root + CACHE_DIRNAME; } static Path prefixRoot(const Path &p) { return s_root + p; } static Path prefixRoot(const std::string &p) { return s_root + p; } diff --git a/src/reapack.cpp b/src/reapack.cpp @@ -69,7 +69,7 @@ ReaPack::ReaPack(REAPER_PLUGIN_HINSTANCE instance) RecursiveCreateDirectory(Path::cacheDir().join().c_str(), 0); m_config = new Config; - m_config->read(Path::prefixRoot("reapack.ini")); + m_config->read(Path::prefixRoot(Path::CONFIG_FILE)); m_progress = Dialog::Create<Progress>(m_instance, m_mainWindow); diff --git a/src/transaction.cpp b/src/transaction.cpp @@ -33,7 +33,7 @@ using namespace std; Transaction::Transaction() : m_isCancelled(false), m_enableReport(false), m_needRestart(false) { - m_registry = new Registry(Path::prefixCache("registry.db")); + m_registry = new Registry(Path::prefixCache(Path::REGISTRY_FILE)); m_downloadQueue.onDone([=](void *) { if(m_installQueue.empty())