Core: store bin path as a Path instead of a std::string

This commit is contained in:
Josh Holtrop 2014-06-22 15:12:43 -04:00
parent 49ccad5ed4
commit b55d8d0f09
3 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#define JES_CORE_H #define JES_CORE_H
#include "jes/Ref.h" #include "jes/Ref.h"
#include "jes/Path.h"
#include <string> #include <string>
namespace jes namespace jes
@ -14,9 +15,10 @@ namespace jes
static Core instance; static Core instance;
void init(const std::string & bin_path); void init(const std::string & bin_path);
PathRef get_bin_path() { return m_bin_path; }
protected: protected:
std::string m_bin_path; PathRef m_bin_path;
}; };
} }

View File

@ -1,6 +1,7 @@
#ifndef JES_PATH_H #ifndef JES_PATH_H
#define JES_PATH_H #define JES_PATH_H
#include "jes/Ref.h"
#include <string> #include <string>
namespace jes namespace jes
@ -17,6 +18,7 @@ namespace jes
void clean(); void clean();
std::string m_path; std::string m_path;
}; };
typedef Ref<Path> PathRef;
} }
#endif #endif

View File

@ -6,6 +6,6 @@ namespace jes
void Core::init(const std::string & bin_path) void Core::init(const std::string & bin_path)
{ {
m_bin_path = bin_path; m_bin_path = new Path(bin_path);
} }
} }