From 4e456e01e584bb25033e1eb696092fd52a53e5ab Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sat, 29 Apr 2023 23:53:05 +0800 Subject: [PATCH] fix: raw code batch convert --- src/klotski_core/raw_code/convert.cc | 5 +++-- src/klotski_core/raw_code/raw_code.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/klotski_core/raw_code/convert.cc b/src/klotski_core/raw_code/convert.cc index 1492961..82f6768 100644 --- a/src/klotski_core/raw_code/convert.cc +++ b/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 ----------------------------- diff --git a/src/klotski_core/raw_code/raw_code.h b/src/klotski_core/raw_code/raw_code.h index 1b6473f..c370e9b 100644 --- a/src/klotski_core/raw_code/raw_code.h +++ b/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;