Pass Original As Reference
This commit is contained in:
parent
5d2b146b08
commit
f72c4f0567
@ -42,7 +42,7 @@ public:
|
|||||||
// Types
|
// Types
|
||||||
using ptr_type = Ret (*)(Args...);
|
using ptr_type = Ret (*)(Args...);
|
||||||
using type = std::function<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
|
// Normal Function
|
||||||
__Function(const char *const name_, const ptr_type func_, const ptr_type thunk_):
|
__Function(const char *const name_, const ptr_type func_, const ptr_type thunk_):
|
||||||
|
@ -41,7 +41,7 @@ export class Method {
|
|||||||
generateTypedefs() {
|
generateTypedefs() {
|
||||||
let out = '';
|
let out = '';
|
||||||
out += `typedef ${formatType(this.returnType.trim())}${this.#getRawType()}${this.args.trim()};\n`;
|
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;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user