summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-09-04 10:32:01 +0800
committerPeng Wu <alexepico@gmail.com>2012-09-04 10:32:01 +0800
commit473bfc9ba3ffe72940570a7c6a1878a77ff45434 (patch)
tree7ec767db31837087a645e7b26351e844ea8b8315
parentd304f969dd1031cd837625dc21ad48602230956c (diff)
downloadlibpinyin-473bfc9ba3ffe72940570a7c6a1878a77ff45434.tar.gz
libpinyin-473bfc9ba3ffe72940570a7c6a1878a77ff45434.tar.xz
libpinyin-473bfc9ba3ffe72940570a7c6a1878a77ff45434.zip
add assert to get_first_token
-rw-r--r--src/storage/phrase_large_table2.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/storage/phrase_large_table2.h b/src/storage/phrase_large_table2.h
index c4d4092..9f9f718 100644
--- a/src/storage/phrase_large_table2.h
+++ b/src/storage/phrase_large_table2.h
@@ -125,6 +125,9 @@ static inline int get_first_token(PhraseTokens tokens,
}
}
+ /* the following line will be removed in future after code are verified. */
+ assert(0 == num || 1 == num);
+
return num;
}