From 511de573db0f31749ba17245a731ad8bbc5bf331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ante=20Pu=C5=A1i=C4=87?= Date: Mon, 19 Feb 2024 16:29:54 +0100 Subject: [PATCH] Make default values explicit --- src/query/procedure/mg_procedure_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/query/procedure/mg_procedure_impl.cpp b/src/query/procedure/mg_procedure_impl.cpp index 3c48bad39..48181213a 100644 --- a/src/query/procedure/mg_procedure_impl.cpp +++ b/src/query/procedure/mg_procedure_impl.cpp @@ -3375,8 +3375,8 @@ mgp_vertex *GetVertexByGid(mgp_graph *graph, memgraph::storage::Gid id, mgp_memo return nullptr; } -void WrapTextSearch(std::vector vertex_ids, std::string error_msg, mgp_graph *graph, - mgp_memory *memory, mgp_map **result) { +void WrapTextSearch(mgp_graph *graph, mgp_memory *memory, mgp_map **result, + const std::vector &vertex_ids = {}, const std::string &error_msg = "") { if (const auto err = mgp_map_make_empty(memory, result); err != mgp_error::MGP_ERROR_NO_ERROR) { throw std::logic_error("Retrieving text search results failed during creation of a mgp_map"); } @@ -3429,7 +3429,7 @@ mgp_error mgp_graph_search_text_index(mgp_graph *graph, const char *index_name, } catch (memgraph::query::QueryException &e) { error_msg = e.what(); } - WrapTextSearch(search_results, error_msg, graph, memory, result); + WrapTextSearch(graph, memory, result, search_results, error_msg); }); }