update for ostd

master
Daniel Kolesa 2017-01-28 23:04:10 +01:00
parent 8e31583612
commit 01899074fd
2 changed files with 5 additions and 5 deletions

View File

@ -109,7 +109,7 @@ static inline int cs_ret_code(int type, int def = 0) {
static void compilestatements(
GenState &gs, int rettype, int brak = '\0', int prevargs = 0
);
static inline ostd::Pair<ostd::ConstCharRange, size_t> compileblock(
static inline std::pair<ostd::ConstCharRange, size_t> compileblock(
GenState &gs, ostd::ConstCharRange p, size_t line,
int rettype = CsRetNull, int brak = '\0'
);
@ -172,7 +172,7 @@ static inline void compileblock(GenState &gs) {
gs.code.push_back(CsCodeEmpty);
}
static inline ostd::Pair<ostd::ConstCharRange, size_t> compileblock(
static inline std::pair<ostd::ConstCharRange, size_t> compileblock(
GenState &gs, ostd::ConstCharRange p, size_t line, int rettype, int brak
) {
size_t start = gs.code.size();
@ -197,7 +197,7 @@ static inline ostd::Pair<ostd::ConstCharRange, size_t> compileblock(
gs.code.resize(start);
gs.code.push_back(CsCodeEmpty | rettype);
}
return ostd::make_pair(p, retline);
return std::make_pair(p, retline);
}
static inline void compileunescapestr(GenState &gs, bool macro = false) {

View File

@ -307,7 +307,7 @@ void cs_init_lib_math(CsState &cs) {
cs.new_command("<<", "i1V", [](auto &, auto args, auto &res) {
cs_mathop<CsInt>(
args, res, 0, [](CsInt val1, CsInt val2) {
return (val2 < CsInt(size_tInBits<CsInt>))
return (val2 < CsInt(ostd::SizeInBits<CsInt>))
? (val1 << ostd::max(val2, CsInt(0)))
: 0;
}, CsMathNoop<CsInt>()
@ -317,7 +317,7 @@ void cs_init_lib_math(CsState &cs) {
cs_mathop<CsInt>(
args, res, 0, [](CsInt val1, CsInt val2) {
return val1 >> ostd::clamp(
val2, CsInt(0), CsInt(size_tInBits<CsInt>)
val2, CsInt(0), CsInt(ostd::SizeInBits<CsInt>)
);
}, CsMathNoop<CsInt>()
);