Skip to content

Commit

Permalink
Revert "Use dynamic_cast for Squirrel wrapper instead of reinterpret_…
Browse files Browse the repository at this point in the history
…cast"

This reverts commit 4dda8ec.
  • Loading branch information
tobbi committed Feb 5, 2023
1 parent 4dda8ec commit df78af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/miniswig/create_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ WrapperCreator::create_function_wrapper(Class* _class, Function* function)
out << ind << ind << "sq_throwerror(vm, _SC(\"'" << function->name << "' called without instance\"));\n";
out << ind << ind << "return SQ_ERROR;\n";
out << ind << "}\n";
out << ind << "auto _this = dynamic_cast<" << ns_prefix << _class->name << "*> (data);\n";
out << ind << "auto _this = reinterpret_cast<" << ns_prefix << _class->name << "*> (data);\n";
out << "\n";
out << ind << "if (_this == nullptr) {\n";
out << ind << ind << "return SQ_ERROR;\n";
Expand Down

0 comments on commit df78af5

Please sign in to comment.