diff --git a/cpp/shared/protobuf_util.cpp b/cpp/shared/protobuf_util.cpp index 56644cfa88..cfd382404e 100644 --- a/cpp/shared/protobuf_util.cpp +++ b/cpp/shared/protobuf_util.cpp @@ -48,8 +48,7 @@ void protobuf_util::SetCommandParams(PbCommand& command, const string& params) string file_pattern; string operations; - const auto& components = Split(params, ':', 3); - switch (components.size()) { + switch (const auto& components = Split(params, ':', 3); components.size()) { case 3: operations = components[2]; [[fallthrough]];