Skip to content

Commit

Permalink
Fix static analyzer warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Artsishevsky <polter.rnd@gmail.com>
  • Loading branch information
polter-rnd committed Nov 30, 2024
1 parent 54b0090 commit f22783c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/slimlog/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class Logger {
* @return \b true if the sink is enabled.
* @return \b false if the sink is disabled.
*/
auto sink_enabled(const std::shared_ptr<Sink<Logger>>& sink) const -> bool
[[nodiscard]] auto sink_enabled(const std::shared_ptr<Sink<Logger>>& sink) const -> bool
{
return m_sinks.sink_enabled(sink);
}
Expand Down
4 changes: 2 additions & 2 deletions include/slimlog/util/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ inline auto localtime_s(Args... /*unused*/)
} // namespace Fallback

struct LocalTime {
explicit LocalTime(const std::time_t& time)
explicit LocalTime(std::time_t time)
: m_time(time)
{
}
Expand Down Expand Up @@ -103,7 +103,7 @@ struct LocalTime {
}

private:
const std::time_t& m_time;
const std::time_t m_time;
std::tm* m_tm{nullptr};
};

Expand Down

0 comments on commit f22783c

Please sign in to comment.