diff options
author | MITSUNARI Shigeo <[email protected]> | 2018-10-21 17:23:26 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2018-10-21 17:23:26 +0900 |
commit | afdb9fe9ff49a48fda3da72d46f45451f8d8e401 (patch) | |
tree | 1685c4f70fb2449a24dbe6ed24d8648078fbbbce /sample/test0.cpp | |
parent | b011aca4b4c866bb5a468c37cd3eb115c095d6ea (diff) | |
download | xbyak-afdb9fe9ff49a48fda3da72d46f45451f8d8e401.tar.gz xbyak-afdb9fe9ff49a48fda3da72d46f45451f8d8e401.zip |
Xbyak::CastTo is removed
Diffstat (limited to 'sample/test0.cpp')
-rw-r--r-- | sample/test0.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sample/test0.cpp b/sample/test0.cpp index cd19e48..5a4d91b 100644 --- a/sample/test0.cpp +++ b/sample/test0.cpp @@ -77,7 +77,7 @@ public: #ifdef XBYAK_VARIADIC_TEMPLATE call(atoi); #else - call(Xbyak::CastTo<void*>(atoi)); + call(reinterpret_cast<const void*>(atoi)); #endif add(esp, 4); #endif @@ -96,7 +96,7 @@ public: mov(rax, (size_t)atoi); jmp(rax); #else - jmp(Xbyak::CastTo<void*>(atoi)); + jmp(reinterpret_cast<const void*>(atoi)); #endif } int (*get() const)(const char *) { return getCode<int (*)(const char *)>(); } @@ -171,8 +171,9 @@ int main() return 1; } int (*func)(int) = s.getCode<int (*)(int)>(); - if (Xbyak::CastTo<uint8*>(func) != p) { - fprintf(stderr, "internal error %p %p\n", p, Xbyak::CastTo<uint8*>(func)); + const uint8 *funcp = reinterpret_cast<const uint8*>(func); + if (funcp != p) { + fprintf(stderr, "internal error %p %p\n", p, funcp); return 1; } printf("0 + ... + %d = %d\n", 100, func(100)); |