Core: store bin path as a Path instead of a std::string
This commit is contained in:
1 parent
49ccad5ed4
commit
b55d8d0f09
3 files changed
+6
-2
No files matched your search
@@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
+1
-1
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user