From 366dccba890bb2992d28f7cad2b8c49aa49b97fd Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sat, 8 Apr 2023 15:05:04 +0800 Subject: [PATCH] update: noexcept for AllCases status function --- src/klotski_core/all_cases/all_cases.cc | 2 +- src/klotski_core/all_cases/all_cases.h | 2 +- src/klotski_core/all_cases/basic_ranges.cc | 2 +- src/klotski_core/all_cases/basic_ranges.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/klotski_core/all_cases/all_cases.cc b/src/klotski_core/all_cases/all_cases.cc index 41c4838..eb2ca86 100644 --- a/src/klotski_core/all_cases/all_cases.cc +++ b/src/klotski_core/all_cases/all_cases.cc @@ -18,7 +18,7 @@ const std::vector (&AllCases::fetch())[16] { return data_; // return const reference } -AllCases::Status AllCases::status() { +AllCases::Status AllCases::status() noexcept { if (available_) { return AVAILABLE; // data already built } diff --git a/src/klotski_core/all_cases/all_cases.h b/src/klotski_core/all_cases/all_cases.h index 62731f0..3092e6d 100644 --- a/src/klotski_core/all_cases/all_cases.h +++ b/src/klotski_core/all_cases/all_cases.h @@ -42,7 +42,7 @@ public: static void build(); /// Get current status of AllCases. - static Status status(); + static Status status() noexcept; /// Blocking access to constructed data. static const std::vector (&fetch())[16]; diff --git a/src/klotski_core/all_cases/basic_ranges.cc b/src/klotski_core/all_cases/basic_ranges.cc index 571fab7..9d89dc4 100644 --- a/src/klotski_core/all_cases/basic_ranges.cc +++ b/src/klotski_core/all_cases/basic_ranges.cc @@ -19,7 +19,7 @@ const std::vector& BasicRanges::fetch() { return data_; // return const reference } -BasicRanges::Status BasicRanges::status() { +BasicRanges::Status BasicRanges::status() noexcept { if (available_) { return AVAILABLE; // data already built } diff --git a/src/klotski_core/all_cases/basic_ranges.h b/src/klotski_core/all_cases/basic_ranges.h index 18688ea..82eb0d0 100644 --- a/src/klotski_core/all_cases/basic_ranges.h +++ b/src/klotski_core/all_cases/basic_ranges.h @@ -49,7 +49,7 @@ public: static void build(); /// Get current status of BasicRanges. - static Status status(); + static Status status() noexcept; /// Blocking access to constructed data. static const std::vector& fetch();