Constify local variables
This commit is contained in:
parent
1a73c8178c
commit
cc281355d6
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user