Skip to content

Commit

Permalink
Sets a default value of the number field for EnclosingNumber class.
Browse files Browse the repository at this point in the history
  • Loading branch information
zonble committed Aug 1, 2024
1 parent 6c80eea commit 1fb8596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/InputState.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct AssociatedPhrasesPlain : InputState {
};

struct EnclosingNumber : InputState {
EnclosingNumber(std::string number) : number(std::move(number)) {}
EnclosingNumber(std::string number = "") : number(std::move(number)) {}
EnclosingNumber(EnclosingNumber const& number) : number(number.number) {}
std::string composingBuffer() const { return "[標題數字] " + number; }
std::string number;
Expand Down Expand Up @@ -294,7 +294,7 @@ struct SelectingFeature : InputState {
return std::make_unique<SelectingDateMacro>(this->converter);
});
features.emplace_back("標題數字", []() {
return std::make_unique<EnclosingNumber>("");
return std::make_unique<EnclosingNumber>();
});
features.emplace_back("中文數字", []() {
return std::make_unique<ChineseNumber>("", ChineseNumberStyle::LOWER);
Expand Down

0 comments on commit 1fb8596

Please sign in to comment.