Skip to content

Commit

Permalink
Fix clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Dec 11, 2024
1 parent e54d434 commit cbe2073
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/core/src/clp/BoundedReader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "BoundedReader.hpp"

#include <cstddef>

#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;
Expand Down
8 changes: 6 additions & 2 deletions components/core/src/clp/BoundedReader.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef CLP_BOUNDEDREADER_HPP
#define CLP_BOUNDEDREADER_HPP

#include <cstddef>
#include <string>

#include "ErrorCode.hpp"
#include "ReaderInterface.hpp"

namespace clp {
Expand Down Expand Up @@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit cbe2073

Please sign in to comment.