diff --git a/data/out.h b/data/out.h index 61e61ed..609e5ca 100644 --- a/data/out.h +++ b/data/out.h @@ -42,7 +42,7 @@ public: // Types using ptr_type = Ret (*)(Args...); using type = std::function; - using overwrite_type = std::function; + using overwrite_type = std::function; // Normal Function __Function(const char *const name_, const ptr_type func_, const ptr_type thunk_): diff --git a/src/method.ts b/src/method.ts index 7456f7e..b543ae6 100644 --- a/src/method.ts +++ b/src/method.ts @@ -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; }