From 5e053207f2f23b739441258922496b6503b79df9 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Tue, 7 Jan 2025 12:15:10 +0100 Subject: [PATCH] cast unique_ptr to the correct type --- src/open_prompt_extension.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/open_prompt_extension.cpp b/src/open_prompt_extension.cpp index bb09eb7..61da7b8 100644 --- a/src/open_prompt_extension.cpp +++ b/src/open_prompt_extension.cpp @@ -38,13 +38,13 @@ namespace duckdb { idx_t model_idx; idx_t json_schema_idx; idx_t json_system_prompt_idx; - unique_ptr Copy() const { - auto res = make_uniq(); - res->model_idx = model_idx; - res->json_schema_idx = json_schema_idx; - res->json_system_prompt_idx = json_system_prompt_idx; - return res; - }; + unique_ptr Copy() const override { + auto res = make_uniq(); + res->model_idx = model_idx; + res->json_schema_idx = json_schema_idx; + res->json_system_prompt_idx = json_system_prompt_idx; + return std::unique_ptr(std::move(res)); + }; bool Equals(const FunctionData &other) const { return model_idx == other.Cast().model_idx && json_schema_idx == other.Cast().json_schema_idx &&