Skip to content

Commit

Permalink
avoid copy
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire authored and anonrig committed Feb 8, 2025
1 parent 1ec1065 commit c47fe8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/debug_utils-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct ToStringHelper {
template <unsigned BASE_BITS,
typename T,
typename = std::enable_if_t<!std::is_integral_v<T>>>
static std::string BaseConvert(T value) {
static std::string BaseConvert(T& value) {
return Convert(std::forward<T>(value));
}
};
Expand Down
3 changes: 1 addition & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ class MaybeStackBuffer {
// Disallow copy constructor
MaybeStackBuffer(const MaybeStackBuffer&) = delete;
// Disallow copy assignment operator
MaybeStackBuffer&
operator=(const MaybeStackBuffer& other) = delete;
MaybeStackBuffer& operator=(const MaybeStackBuffer& other) = delete;

const T* out() const {
return buf_;
Expand Down

0 comments on commit c47fe8c

Please sign in to comment.