From 672a9e5a2d19a45a54bbd049ebfea7fbdb8ac323 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:17:58 +0200 Subject: [PATCH 1/3] Make some dtors virtual --- include/log++.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/log++.h b/include/log++.h index 6f9a460..3b9f4a6 100644 --- a/include/log++.h +++ b/include/log++.h @@ -671,6 +671,7 @@ class InternalCondLog : public InternalLog { : InternalLog(severity) { should_print_ = cond; } + ~InternalCondLog() override = default; }; @@ -679,12 +680,14 @@ class LogPolicyBase { virtual void update() = 0; [[nodiscard]] virtual bool shouldLog() const = 0; virtual void onLog() {}; + virtual ~LogPolicyBase() = default; }; template class LogPolicy : public LogPolicyBase { public: explicit LogPolicy(T max) : max_(max) {} + ~LogPolicy() override = default; protected: T max_{0}; }; @@ -716,7 +719,7 @@ class OccasionPolicy : public CountableLogPolicy { return should_log_; } - virtual ~OccasionPolicy() = default; + ~OccasionPolicy() override = default; private: bool should_log_{false}; }; @@ -738,7 +741,7 @@ class FirstNOccurrencesPolicy : public CountableLogPolicy { return !is_n_occurences_reached; } - virtual ~FirstNOccurrencesPolicy() = default; + ~FirstNOccurrencesPolicy() override = default; private: bool is_n_occurences_reached = false; }; @@ -764,7 +767,7 @@ class TimePolicy : public LogPolicy { last_ = now_; } - virtual ~TimePolicy() = default; + ~TimePolicy() override = default; private: long now_{0}; long last_{0}; From 513d6312deebfc433a57cfc3e072ca4731e24578 Mon Sep 17 00:00:00 2001 From: 4c3y Date: Wed, 30 Oct 2024 13:10:49 +0100 Subject: [PATCH 2/3] Fix README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7138aa..1d01294 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ $ git submodule add git@github.com:ethz-asl/lpp.git ```cmake add_subdirectory(my_submodule_dir/lpp) add_executable(my_executable main.cpp) -target_link_libraries(my_executable Log++) +target_link_libraries(my_executable lpp) ``` 3. To update Log++ to the latest commit, execute the following commands: From 0bef296c707c450dd01a702824975eb7046b0447 Mon Sep 17 00:00:00 2001 From: 4c3y Date: Wed, 30 Oct 2024 13:11:14 +0100 Subject: [PATCH 3/3] changed maintainer email to match git email --- package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.xml b/package.xml index a8e173f..771505c 100644 --- a/package.xml +++ b/package.xml @@ -3,7 +3,7 @@ lpp 0.1.0 Log++ Logging framework - 4c3y + 4c3y BSD catkin roscpp