summaryrefslogtreecommitdiffstats
path: root/src/storage/chewing_key.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/chewing_key.h')
-rw-r--r--src/storage/chewing_key.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h
index 05b6949..ec8c7a3 100644
--- a/src/storage/chewing_key.h
+++ b/src/storage/chewing_key.h
@@ -176,6 +176,18 @@ struct ChewingKey
}
};
+static inline bool operator == (ChewingKey lhs, ChewingKey rhs) {
+ if (lhs.m_initial != rhs.m_initial)
+ return false;
+ if (lhs.m_middle != rhs.m_middle)
+ return false;
+ if (lhs.m_final != rhs.m_final)
+ return false;
+ if (lhs.m_tone != rhs.m_tone)
+ return false;
+ return true;
+}
+
struct ChewingKeyRest
{
guint16 m_table_index; /* the index in pinyin parser table. */