forked from OctaForge/libcubescript
remove dependency on types.hh
parent
5b1baafdb3
commit
d744c6b1c6
|
@ -12,7 +12,6 @@
|
||||||
#include "cubescript_conf.hh"
|
#include "cubescript_conf.hh"
|
||||||
|
|
||||||
#include <ostd/platform.hh>
|
#include <ostd/platform.hh>
|
||||||
#include <ostd/types.hh>
|
|
||||||
#include <ostd/string.hh>
|
#include <ostd/string.hh>
|
||||||
#include <ostd/vector.hh>
|
#include <ostd/vector.hh>
|
||||||
#include <ostd/range.hh>
|
#include <ostd/range.hh>
|
||||||
|
|
|
@ -181,7 +181,9 @@ struct cs_gen_state {
|
||||||
if (word.size() <= 3 && !macro) {
|
if (word.size() <= 3 && !macro) {
|
||||||
uint32_t op = CsCodeValInt | CsRetString;
|
uint32_t op = CsCodeValInt | CsRetString;
|
||||||
for (size_t i = 0; i < word.size(); ++i) {
|
for (size_t i = 0; i < word.size(); ++i) {
|
||||||
op |= uint32_t(ostd::byte(word[i])) << ((i + 1) * 8);
|
op |= uint32_t(
|
||||||
|
static_cast<unsigned char>(word[i])
|
||||||
|
) << ((i + 1) * 8);
|
||||||
}
|
}
|
||||||
code.push_back(op);
|
code.push_back(op);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -45,7 +45,7 @@ void cs_init_lib_string(cs_state &cs) {
|
||||||
if (i >= cs_int(str.size())) {
|
if (i >= cs_int(str.size())) {
|
||||||
res.set_int(0);
|
res.set_int(0);
|
||||||
} else {
|
} else {
|
||||||
res.set_int(ostd::byte(str[i]));
|
res.set_int(static_cast<unsigned char>(str[i]));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue