From 89ff88b32e64893a4671853bad187d883bf8ad95 Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Mon, 19 Aug 2024 00:30:07 +0200 Subject: [PATCH] Use keywords "static inline constexpr" for constants, if possible. --- .../mlrl/boosting/losses/loss_decomposable_sparse_common.hpp | 2 +- .../common/include/mlrl/common/data/view_matrix_sparse_set.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/subprojects/boosting/src/mlrl/boosting/losses/loss_decomposable_sparse_common.hpp b/cpp/subprojects/boosting/src/mlrl/boosting/losses/loss_decomposable_sparse_common.hpp index 14ffe601e1..5a5ad758cd 100644 --- a/cpp/subprojects/boosting/src/mlrl/boosting/losses/loss_decomposable_sparse_common.hpp +++ b/cpp/subprojects/boosting/src/mlrl/boosting/losses/loss_decomposable_sparse_common.hpp @@ -12,7 +12,7 @@ namespace boosting { - static const uint32 LIMIT = std::numeric_limits::max(); + static inline constexpr uint32 LIMIT = std::numeric_limits::max(); template static inline uint32 fetchNextStatistic(IndexIterator& indexIterator, IndexIterator indicesEnd, diff --git a/cpp/subprojects/common/include/mlrl/common/data/view_matrix_sparse_set.hpp b/cpp/subprojects/common/include/mlrl/common/data/view_matrix_sparse_set.hpp index 94b4a942c0..440255f2ad 100644 --- a/cpp/subprojects/common/include/mlrl/common/data/view_matrix_sparse_set.hpp +++ b/cpp/subprojects/common/include/mlrl/common/data/view_matrix_sparse_set.hpp @@ -259,7 +259,7 @@ class MLRLCOMMON_API SparseSetView /** * The index that is used to indicate that the value at a specific row and column is zero. */ - static const uint32 MAX_INDEX = std::numeric_limits::max(); + static inline constexpr uint32 MAX_INDEX = std::numeric_limits::max(); public: