Pass Original As Reference
This commit is contained in:
parent
5d2b146b08
commit
f72c4f0567
@ -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_):
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user