From 58544a9d3a4096f1fecc46a0680cdbd049d38c56 Mon Sep 17 00:00:00 2001 From: Elazar Gershuni Date: Thu, 7 Nov 2024 18:02:03 +0200 Subject: [PATCH] review comments Signed-off-by: Elazar Gershuni --- src/crab/cfg.hpp | 4 ++-- src/main/check.cpp | 2 +- src/main/run_yaml.cpp | 2 +- src/test/conformance_check.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crab/cfg.hpp b/src/crab/cfg.hpp index 3ade673f8..38fc4c41a 100644 --- a/src/crab/cfg.hpp +++ b/src/crab/cfg.hpp @@ -365,10 +365,10 @@ class cfg_t final { } //! return a begin iterator of label_t's - const_label_iterator label_begin() { return boost::make_transform_iterator(m_blocks.begin(), get_label()); } + const_label_iterator label_begin() const { return boost::make_transform_iterator(m_blocks.begin(), get_label()); } //! return an end iterator of label_t's - const_label_iterator label_end() { return boost::make_transform_iterator(m_blocks.end(), get_label()); } + const_label_iterator label_end() const { return boost::make_transform_iterator(m_blocks.end(), get_label()); } //! return a begin iterator of label_t's [[nodiscard]] diff --git a/src/main/check.cpp b/src/main/check.cpp index 20df2a392..885163568 100644 --- a/src/main/check.cpp +++ b/src/main/check.cpp @@ -66,7 +66,7 @@ static std::optional find_program(vector& raw_progs, c return {}; } -int main(const int argc, char** argv) { +int main(int argc, char** argv) { // Always call ebpf_verifier_clear_thread_local_state on scope exit. at_scope_exit clear_thread_local_state; diff --git a/src/main/run_yaml.cpp b/src/main/run_yaml.cpp index 9f3860699..f447b9881 100644 --- a/src/main/run_yaml.cpp +++ b/src/main/run_yaml.cpp @@ -8,7 +8,7 @@ // Avoid affecting other headers by macros. #include "CLI11/CLI11.hpp" -int main(const int argc, char** argv) { +int main(int argc, char** argv) { CLI::App app{"Run YAML test cases"}; std::string filename; diff --git a/src/test/conformance_check.cpp b/src/test/conformance_check.cpp index 7f744b0ea..a719b70fb 100644 --- a/src/test/conformance_check.cpp +++ b/src/test/conformance_check.cpp @@ -45,7 +45,7 @@ std::vector base16_decode(const std::string& input) { * the first argument. It then executes the BPF program and prints the * value of r0 at the end of execution. */ -int main(const int argc, char** argv) { +int main(int argc, char** argv) { CLI::App app{"Check conformance"}; bool debug = false; app.add_flag("--debug", debug, "Debug");