Skip to content

Commit

Permalink
Remove const from range_window_bounds::_extent. (#15138)
Browse files Browse the repository at this point in the history
The `const` on the `_extent` member of `range_window_bounds` is superfluous. It provides no additional protection to `range_window_bounds`'s invariants, and prevents the class from being copy assignable.

This change removes the `const`, thus making `range_window_bounds` copy-assignable, and more readily usable from Cython.

Authors:
  - MithunR (https://github.com/mythrocks)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Nghia Truong (https://github.com/ttnghia)

URL: #15138
  • Loading branch information
mythrocks authored Feb 26, 2024
1 parent c37367e commit 7d2da0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/include/cudf/rolling/range_window_bounds.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -104,7 +104,7 @@ struct range_window_bounds {
range_window_bounds() = default; // Required for use as return types from dispatch functors.

private:
const extent_type _extent{extent_type::UNBOUNDED};
extent_type _extent{extent_type::UNBOUNDED};
std::shared_ptr<scalar> _range_scalar{nullptr}; // To enable copy construction/assignment.

range_window_bounds(extent_type extent_, std::unique_ptr<scalar> range_scalar_);
Expand Down

0 comments on commit 7d2da0e

Please sign in to comment.