Fix compile errors and remove uses of nullptr

This commit is contained in:
Zeex 2018-09-08 00:05:36 +06:00
parent 3a61f8f270
commit b58b8370ba

View File

@ -1,3 +1,4 @@
#include <cstdlib>
#include <iostream>
#include <subhook.h>
@ -15,7 +16,7 @@ typedef void (*foo_func_t)();
#endif
extern "C" void FOO_CALL foo();
foo_func_t foo_tr = nullptr;
foo_func_t foo_tr = 0;
void foo_hooked() {
std::cout << "foo_hooked() called" << std::endl;;
@ -66,7 +67,7 @@ int main() {
return EXIT_FAILURE;
}
foo_tr = (foo_func_t)foo_hook_tr.GetTrampoline();
if (foo_tr == nullptr) {
if (foo_tr == 0) {
std::cout << "Failed to build trampoline" << std::endl;
return EXIT_FAILURE;
}