Core: store bin path as a Path instead of a std::string
This commit is contained in:
parent
49ccad5ed4
commit
b55d8d0f09
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user