From 7d2da0e5bd9bc178ab394506e58207667c59eedb Mon Sep 17 00:00:00 2001 From: MithunR Date: Sun, 25 Feb 2024 20:22:10 -0800 Subject: [PATCH] Remove `const` from `range_window_bounds::_extent`. (#15138) 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: https://github.com/rapidsai/cudf/pull/15138 --- cpp/include/cudf/rolling/range_window_bounds.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/include/cudf/rolling/range_window_bounds.hpp b/cpp/include/cudf/rolling/range_window_bounds.hpp index ebb28d0b5c4..81885ade2f0 100644 --- a/cpp/include/cudf/rolling/range_window_bounds.hpp +++ b/cpp/include/cudf/rolling/range_window_bounds.hpp @@ -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. @@ -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 _range_scalar{nullptr}; // To enable copy construction/assignment. range_window_bounds(extent_type extent_, std::unique_ptr range_scalar_);