Pass Original As Reference

This commit is contained in:
TheBrokenRail 2024-09-21 02:53:02 -04:00
parent 5d2b146b08
commit f72c4f0567
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ public:
// Types
using ptr_type = Ret (*)(Args...);
using type = std::function<Ret(Args...)>;
using overwrite_type = std::function<Ret(type, Args...)>;
using overwrite_type = std::function<Ret(const type &, Args...)>;
// Normal Function
__Function(const char *const name_, const ptr_type func_, const ptr_type thunk_):

View File

@ -41,7 +41,7 @@ export class Method {
generateTypedefs() {
let out = '';
out += `typedef ${formatType(this.returnType.trim())}${this.#getRawType()}${this.args.trim()};\n`;
out += `typedef std::function<${this.#getRawType()}> ${this.getType()};\n`;
out += `typedef const std::function<${this.#getRawType()}> &${this.getType()};\n`;
return out;
}