From cbe20731f3bdf769b4162ca71c4ae6c74550b4cc Mon Sep 17 00:00:00 2001 From: gibber9809 Date: Wed, 11 Dec 2024 21:08:47 +0000 Subject: [PATCH] Fix clang-tidy warnings --- components/core/src/clp/BoundedReader.cpp | 4 ++++ components/core/src/clp/BoundedReader.hpp | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/core/src/clp/BoundedReader.cpp b/components/core/src/clp/BoundedReader.cpp index d04e65976..9bca08f71 100644 --- a/components/core/src/clp/BoundedReader.cpp +++ b/components/core/src/clp/BoundedReader.cpp @@ -1,5 +1,9 @@ #include "BoundedReader.hpp" +#include + +#include "ErrorCode.hpp" + namespace clp { auto BoundedReader::try_seek_from_begin(size_t pos) -> ErrorCode { auto const next_pos = pos > m_bound ? m_bound : pos; diff --git a/components/core/src/clp/BoundedReader.hpp b/components/core/src/clp/BoundedReader.hpp index f6abb3abb..cfcb07422 100644 --- a/components/core/src/clp/BoundedReader.hpp +++ b/components/core/src/clp/BoundedReader.hpp @@ -1,6 +1,10 @@ #ifndef CLP_BOUNDEDREADER_HPP #define CLP_BOUNDEDREADER_HPP +#include +#include + +#include "ErrorCode.hpp" #include "ReaderInterface.hpp" namespace clp { @@ -46,7 +50,7 @@ class BoundedReader : public ReaderInterface { * @return ErrorCode_EndOfFile on EOF or if trying to seek beyond the checkpoint * @return ErrorCode_errno on failure */ - [[nodicard]] auto try_seek_from_begin(size_t pos) -> ErrorCode override; + [[nodiscard]] auto try_seek_from_begin(size_t pos) -> ErrorCode override; /** * Tries to read up to a given number of bytes from the file, limited by the bound. @@ -66,7 +70,7 @@ class BoundedReader : public ReaderInterface { * will not respect the bound. * @return ErrorCode_Unsupported */ - [[nodicard]] auto try_read_to_delimiter( + [[nodiscard]] auto try_read_to_delimiter( [[maybe_unused]] char delim, [[maybe_unused]] bool keep_delimiter, [[maybe_unused]] bool append,