Browse Source

fix: raw code batch convert

master
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"
using klotski::RawCode;
using klotski::RawCodes;
using klotski::RawCodeExp;
using klotski::CommonCode;
using klotski::CommonCodes;
@ -46,8 +47,8 @@ RawCode RawCode::from_common_code(const std::string &common_code) {
/// ---------------------------- Batch conversion -----------------------------
CommonCodes RawCode::convert(const RawCodes &raw_codes) noexcept {
return {raw_codes.begin(), raw_codes.end()};
RawCodes RawCode::convert(const CommonCodes &common_codes) noexcept {
return {common_codes.begin(), common_codes.end()};
}
/// ----------------------------- 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);
/// Batch conversion
static CommonCodes convert(const RawCodes &raw_codes) noexcept;
static RawCodes convert(const CommonCodes &common_codes) noexcept;
/// Mirror functions
RawCode to_vertical_mirror() const noexcept;

Loading…
Cancel
Save