From 7d5ef01c175775d4df3cbd838aebcc2dc3c6cf20 Mon Sep 17 00:00:00 2001 From: shameekganguly Date: Fri, 19 May 2023 11:58:09 -0700 Subject: [PATCH] Few clangtidy fixes (#343) Signed-off-by: Shameek Ganguly --- src/Filesystem.cc | 2 +- src/Generator.cc | 2 +- src/Generator.hh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Filesystem.cc b/src/Filesystem.cc index aea5e352..05976cad 100644 --- a/src/Filesystem.cc +++ b/src/Filesystem.cc @@ -220,7 +220,7 @@ namespace gz #endif // _WIN32 ////////////////////////////////////////////////// - const std::string separator(const std::string &_p) + std::string separator(const std::string &_p) { return _p + preferred_separator; } diff --git a/src/Generator.cc b/src/Generator.cc index f6c29147..ffac7bff 100644 --- a/src/Generator.cc +++ b/src/Generator.cc @@ -149,7 +149,7 @@ bool Generator::Generate(const FileDescriptor *_file, auto ns = getNamespaces(_file->package()); - for (auto name : ns) + for (const auto name : ns) printer.PrintRaw("namespace " + name + " {\n"); for (auto i = 0; i < _file->message_type_count(); ++i) diff --git a/src/Generator.hh b/src/Generator.hh index f30c28b5..4630b20f 100644 --- a/src/Generator.hh +++ b/src/Generator.hh @@ -25,8 +25,6 @@ namespace google { namespace protobuf { namespace compiler { namespace cpp { -class GeneratorContext; - /// \cond /// \brief Google protobuf message generator for igntion::msgs class Generator : public CodeGenerator