Browse Source

update: delete default constructor

master
Dnomd343 2 years ago
parent
commit
fa6cdb4931
  1. 2
      src/klotski_core/common_code/common_code.h
  2. 2
      src/klotski_core/raw_code/raw_code.h
  3. 2
      src/klotski_core/short_code/short_code.h

2
src/klotski_core/common_code/common_code.h

@ -79,7 +79,6 @@ public:
class CommonCode {
uint64_t code_;
CommonCode() = default; // unsafe initialize
static inline uint64_t string_decode(const std::string &common_code);
static inline std::string string_encode(uint64_t common_code, bool shorten) noexcept;
@ -100,6 +99,7 @@ public:
constexpr uint64_t unwrap() const noexcept { return code_; }
/// CommonCode constructors
CommonCode() = delete;
explicit CommonCode(uint64_t common_code);
explicit CommonCode(RawCode &&raw_code) noexcept;
explicit CommonCode(ShortCode &&short_code) noexcept;

2
src/klotski_core/raw_code/raw_code.h

@ -61,7 +61,6 @@ public:
class RawCode {
uint64_t code_;
RawCode() = default; // unsafe initialize
static inline uint64_t compact(uint64_t raw_code) noexcept; // raw code -> common code
static inline uint64_t extract(uint64_t common_code) noexcept; // common code -> raw code
@ -86,6 +85,7 @@ public:
constexpr uint64_t unwrap() const noexcept { return code_; }
/// RawCode constructors
RawCode() = delete;
explicit RawCode(uint64_t raw_code);
explicit RawCode(CommonCode &&common_code) noexcept;
explicit RawCode(const CommonCode &common_code) noexcept;

2
src/klotski_core/short_code/short_code.h

@ -86,7 +86,6 @@ public:
private:
uint32_t code_;
ShortCode() = default; // unsafe initialize
static Mode mode();
static bool fast_mode_available_;
@ -118,6 +117,7 @@ public:
constexpr uint32_t unwrap() const noexcept { return code_; }
/// ShortCode constructors
ShortCode() = delete;
explicit ShortCode(uint32_t short_code);
explicit ShortCode(std::string &&short_code);
explicit ShortCode(CommonCode &&common_code) noexcept;

Loading…
Cancel
Save