Skip to content

Commit

Permalink
Fix a few nodiscard warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Nov 21, 2024
1 parent 9670449 commit e98e11c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cpp/include/cudf/ast/expressions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,19 +612,19 @@ class tree {
* @brief get the first expression in the tree
* @returns the first inserted expression into the tree
*/
expression const& front() const { return *expressions.front(); }
[[nodiscard]] expression const& front() const { return *expressions.front(); }

/**
* @brief get the last expression in the tree
* @returns the last inserted expression into the tree
*/
expression const& back() const { return *expressions.back(); }
[[nodiscard]] expression const& back() const { return *expressions.back(); }

/**
* @brief get the number of expressions added to the tree
* @returns the number of expressions added to the tree
*/
size_t size() const { return expressions.size(); }
[[nodiscard]] size_t size() const { return expressions.size(); }

/**
* @brief get the expression at an index in the tree. Index is checked.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/io/json/parser_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct allnull_column_functor {
rmm::device_async_resource_ref mr;

private:
auto make_zeroed_offsets(size_type size) const
[[nodiscard]] auto make_zeroed_offsets(size_type size) const
{
auto offsets_buff =
cudf::detail::make_zeroed_device_uvector_async<size_type>(size + 1, stream, mr);
Expand Down

0 comments on commit e98e11c

Please sign in to comment.