From 01899074fd666731e6a11c47f64fd8729367a8af Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 28 Jan 2017 23:04:10 +0100 Subject: [PATCH] update for ostd --- src/cs_gen.cc | 6 +++--- src/lib_math.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cs_gen.cc b/src/cs_gen.cc index 0e6099dc..01a3da1d 100644 --- a/src/cs_gen.cc +++ b/src/cs_gen.cc @@ -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 compileblock( +static inline std::pair 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 compileblock( +static inline std::pair 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 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) { diff --git a/src/lib_math.cc b/src/lib_math.cc index 7278fb57..460ad9d4 100644 --- a/src/lib_math.cc +++ b/src/lib_math.cc @@ -307,7 +307,7 @@ void cs_init_lib_math(CsState &cs) { cs.new_command("<<", "i1V", [](auto &, auto args, auto &res) { cs_mathop( args, res, 0, [](CsInt val1, CsInt val2) { - return (val2 < CsInt(size_tInBits)) + return (val2 < CsInt(ostd::SizeInBits)) ? (val1 << ostd::max(val2, CsInt(0))) : 0; }, CsMathNoop() @@ -317,7 +317,7 @@ void cs_init_lib_math(CsState &cs) { cs_mathop( args, res, 0, [](CsInt val1, CsInt val2) { return val1 >> ostd::clamp( - val2, CsInt(0), CsInt(size_tInBits) + val2, CsInt(0), CsInt(ostd::SizeInBits) ); }, CsMathNoop() );