Skip to content

Commit

Permalink
Fix cppcheck warning, remove unneeded overload
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 2, 2024
1 parent c6af969 commit b66e087
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/log/pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class Pattern {
auto placeholder = std::find_if(
Placeholders::List.begin(),
Placeholders::List.end(),
[&pattern](const auto& item) { return pattern.starts_with(item.second); });
[pattern](const auto& item) { return pattern.starts_with(item.second); });
if (placeholder == Placeholders::List.end()) {
throw FormatError("format error: unknown pattern placeholder found");
}
Expand Down
14 changes: 1 addition & 13 deletions include/util/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Buffer {
/**
* @brief Appends data to the end of the buffer.
*
* @tparam U Input data type.
* @param begin Begin iterator of the source data.
* @param end End iterator of the source data.
*/
Expand Down Expand Up @@ -411,19 +412,6 @@ class MemoryBuffer : public Buffer<T> {
Buffer<T>::append(range.data(), range.data() + range.size());
}

/**
* @brief Appends data to the end of the buffer.
*
* @tparam U Input data type.
* @param begin Begin iterator of the source data.
* @param end End iterator of the source data.
*/
template<typename U>
void append(const U* begin, const U* end)
{
Buffer<T>::append(begin, end);
}

protected:
#if defined(ENABLE_FMTLIB) && FMT_VERSION < 110000
/**
Expand Down

0 comments on commit b66e087

Please sign in to comment.