From f72c4f0567c62897d74c734819c11705df0bf4ee Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sat, 21 Sep 2024 02:53:02 -0400 Subject: [PATCH] Pass Original As Reference --- data/out.h | 2 +- src/method.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }