From cc281355d6bea14b12bbf29e80cc600b2d9d9a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Benjamin=20Antal?= Date: Mon, 24 Jan 2022 13:51:13 +0100 Subject: [PATCH] Constify local variables --- src/query/interpreter.cpp | 4 ++-- src/query/stream/streams.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/query/interpreter.cpp b/src/query/interpreter.cpp index e33d40d61..18c3089a9 100644 --- a/src/query/interpreter.cpp +++ b/src/query/interpreter.cpp @@ -568,8 +568,8 @@ Callback::CallbackFunction GetKafkaCreateCallback(StreamQuery *stream_query, Exp std::string_view map_name) -> std::unordered_map { std::unordered_map config_map; for (const auto [key_expr, value_expr] : map) { - auto key = key_expr->Accept(evaluator); - auto value = value_expr->Accept(evaluator); + const auto key = key_expr->Accept(evaluator); + const auto value = value_expr->Accept(evaluator); if (!key.IsString() || !value.IsString()) { throw SemanticException("{} must contain only string keys and values!", map_name); } diff --git a/src/query/stream/streams.cpp b/src/query/stream/streams.cpp index 2bafad452..1763956a3 100644 --- a/src/query/stream/streams.cpp +++ b/src/query/stream/streams.cpp @@ -310,7 +310,7 @@ void Streams::RegisterKafkaProcedures() { return configs_value; }; - auto configs_value = convert_config_map(info.configs); + const auto configs_value = convert_config_map(info.configs); if (configs_value == nullptr) { return; } @@ -323,7 +323,7 @@ void Streams::RegisterKafkaProcedures() { return {pair.first, integrations::kReducted}; }); - auto credentials_value = convert_config_map(reducted_credentials); + const auto credentials_value = convert_config_map(reducted_credentials); if (credentials_value == nullptr) { return; }