From 673c91a5a78f3a175ec782219d99cfa95ef5df76 Mon Sep 17 00:00:00 2001 From: Devon Adair Date: Mon, 18 Mar 2024 18:56:25 -0400 Subject: [PATCH] fix: Fixing clang-tidy warnings --- include/libdbc/dbc.hpp | 2 +- src/dbc.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libdbc/dbc.hpp b/include/libdbc/dbc.hpp index b732895..2dfe7bf 100644 --- a/include/libdbc/dbc.hpp +++ b/include/libdbc/dbc.hpp @@ -52,7 +52,7 @@ class DbcParser : public Parser { void parse_dbc_nodes(std::istream& file_stream); void parse_dbc_messages(const std::vector& lines); - std::string get_extension(const std::string& file_name); + static std::string get_extension(const std::string& file_name); }; } diff --git a/src/dbc.cpp b/src/dbc.cpp index 5c3e2c0..108ab7e 100644 --- a/src/dbc.cpp +++ b/src/dbc.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -93,7 +94,7 @@ void DbcParser::parse_file(const std::string& file) { } std::string DbcParser::get_extension(const std::string& file_name) { - size_t dot = file_name.find_last_of("."); + std::size_t dot = file_name.find_last_of("."); if (dot != std::string::npos) { return file_name.substr(dot, file_name.size() - dot); }