Don't use auto&& in non-template code
Use explicit types instead.
This commit is contained in:
@ -76,9 +76,9 @@ void Avro::read_source_service_options(SERVICE* source)
|
||||
}
|
||||
}
|
||||
|
||||
for (auto&& opt: mxs::strtok(config_get_string(params, "router_options"), ", \t"))
|
||||
for (const auto& opt: mxs::strtok(config_get_string(params, "router_options"), ", \t"))
|
||||
{
|
||||
auto&& kv = mxs::strtok(opt, "=");
|
||||
auto kv = mxs::strtok(opt, "=");
|
||||
|
||||
if (kv[0] == "binlogdir")
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ static bool configureInstance(MXS_ROUTER* instance, MXS_CONFIG_PARAMETER* params
|
||||
uint64_t bitvalue = 0;
|
||||
bool ok = true;
|
||||
|
||||
for (auto&& opt: mxs::strtok(config_get_string(params, "router_options"), ", \t"))
|
||||
for (const auto& opt: mxs::strtok(config_get_string(params, "router_options"), ", \t"))
|
||||
{
|
||||
if (!strcasecmp(opt.c_str(), "master"))
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ static void log_router_options_not_supported(SERVICE* service, MXS_CONFIG_PARAME
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
for (auto&& a: mxs::strtok(p->value, ", \t"))
|
||||
for (const auto& a: mxs::strtok(p->value, ", \t"))
|
||||
{
|
||||
ss << a << "\n";
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ Config::Config(MXS_CONFIG_PARAMETER* conf):
|
||||
// TODO: Don't process this in the router
|
||||
if (MXS_CONFIG_PARAMETER* p = config_get_param(conf, "ignore_databases"))
|
||||
{
|
||||
for (auto&& a: mxs::strtok(p->value, ", \t"))
|
||||
for (const auto& a: mxs::strtok(p->value, ", \t"))
|
||||
{
|
||||
ignored_dbs.insert(a);
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ bool SchemaRouterSession::send_shards()
|
||||
ServerMap pContent;
|
||||
m_shard.get_content(pContent);
|
||||
|
||||
for (auto&& a : pContent)
|
||||
for (const auto& a : pContent)
|
||||
{
|
||||
set->add_row({a.first, a.second->name});
|
||||
}
|
||||
@ -1559,7 +1559,7 @@ bool SchemaRouterSession::send_databases()
|
||||
|
||||
std::unique_ptr<ResultSet> set = ResultSet::create({"Table"});
|
||||
|
||||
for (auto&& a : list)
|
||||
for (const auto& a : list)
|
||||
{
|
||||
set->add_row({a});
|
||||
}
|
||||
@ -1613,7 +1613,7 @@ bool SchemaRouterSession::send_tables(GWBUF* pPacket)
|
||||
{
|
||||
std::unique_ptr<ResultSet> set = ResultSet::create({"Table"});
|
||||
|
||||
for (auto&& a : list)
|
||||
for (const auto& a : list)
|
||||
{
|
||||
set->add_row({a});
|
||||
}
|
||||
|
Reference in New Issue
Block a user