Use default copy/move ctors and assignment ops

This commit is contained in:
Lukhnos Liu 2022-01-31 22:07:23 -08:00
parent aa27cbbb02
commit f0222c023d
1 changed files with 4 additions and 9 deletions

View File

@ -41,15 +41,10 @@ class BopomofoSyllable {
typedef unsigned int Component; typedef unsigned int Component;
BopomofoSyllable(Component syllable = 0) : m_syllable(syllable) {} BopomofoSyllable(Component syllable = 0) : m_syllable(syllable) {}
BopomofoSyllable(const BopomofoSyllable& another) BopomofoSyllable(const BopomofoSyllable&) = default;
: m_syllable(another.m_syllable) {} BopomofoSyllable(BopomofoSyllable&& another) = default;
BopomofoSyllable& operator=(const BopomofoSyllable&) = default;
~BopomofoSyllable() {} BopomofoSyllable& operator=(BopomofoSyllable&&) = default;
BopomofoSyllable& operator=(const BopomofoSyllable& another) {
m_syllable = another.m_syllable;
return *this;
}
// takes the ASCII-form, "v"-tolerant, TW-style Hanyu Pinyin (fong, pong, bong // takes the ASCII-form, "v"-tolerant, TW-style Hanyu Pinyin (fong, pong, bong
// acceptable) // acceptable)