Browse Source

fix: raw code batch convert

legacy
Dnomd343 2 years ago
parent
commit
4e456e01e5
  1. 5
      src/klotski_core/raw_code/convert.cc
  2. 2
      src/klotski_core/raw_code/raw_code.h

5
src/klotski_core/raw_code/convert.cc

@ -2,6 +2,7 @@
#include "raw_code.h" #include "raw_code.h"
using klotski::RawCode; using klotski::RawCode;
using klotski::RawCodes;
using klotski::RawCodeExp; using klotski::RawCodeExp;
using klotski::CommonCode; using klotski::CommonCode;
using klotski::CommonCodes; using klotski::CommonCodes;
@ -46,8 +47,8 @@ RawCode RawCode::from_common_code(const std::string &common_code) {
/// ---------------------------- Batch conversion ----------------------------- /// ---------------------------- Batch conversion -----------------------------
CommonCodes RawCode::convert(const RawCodes &raw_codes) noexcept { RawCodes RawCode::convert(const CommonCodes &common_codes) noexcept {
return {raw_codes.begin(), raw_codes.end()}; return {common_codes.begin(), common_codes.end()};
} }
/// ----------------------------- Basic Functions ----------------------------- /// ----------------------------- Basic Functions -----------------------------

2
src/klotski_core/raw_code/raw_code.h

@ -101,7 +101,7 @@ public:
static RawCode from_common_code(const std::string &common_code); static RawCode from_common_code(const std::string &common_code);
/// Batch conversion /// Batch conversion
static CommonCodes convert(const RawCodes &raw_codes) noexcept; static RawCodes convert(const CommonCodes &common_codes) noexcept;
/// Mirror functions /// Mirror functions
RawCode to_vertical_mirror() const noexcept; RawCode to_vertical_mirror() const noexcept;

Loading…
Cancel
Save