Skip to content

Commit

Permalink
refactor: Fix clang-tidy warnings in DeserializerBufferReader. (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 authored Jan 8, 2025
1 parent 9157dfa commit 8d1361b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lint-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ tasks:
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/api_decoration.hpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/error_messages.hpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ExceptionFFI.hpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/DeserializerBufferReader.cpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/DeserializerBufferReader.hpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PyDeserializer.cpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PyDeserializer.hpp"
- "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PyKeyValuePairLogEvent.cpp"
Expand Down
2 changes: 1 addition & 1 deletion src/clp_ffi_py/ir/native/DeserializerBufferReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ auto DeserializerBufferReader::try_read(char* buf, size_t num_bytes_to_read, siz
auto const bytes_to_copy{
buffered_bytes_view.subspan(0, std::min(buffered_bytes_view.size(), dst_buf.size()))
};
std::copy(bytes_to_copy.begin(), bytes_to_copy.end(), dst_buf.begin());
std::ranges::copy(bytes_to_copy.begin(), bytes_to_copy.end(), dst_buf.begin());

// Commit read
auto const num_bytes_copied{bytes_to_copy.size()};
Expand Down

0 comments on commit 8d1361b

Please sign in to comment.