Constify local variables

This commit is contained in:
János Benjamin Antal 2022-01-24 13:51:13 +01:00
parent 1a73c8178c
commit cc281355d6
2 changed files with 4 additions and 4 deletions

View File

@ -568,8 +568,8 @@ Callback::CallbackFunction GetKafkaCreateCallback(StreamQuery *stream_query, Exp
std::string_view map_name) -> std::unordered_map<std::string, std::string> {
std::unordered_map<std::string, std::string> 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);
}

View File

@ -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;
}