diff options
author | Peng Wu <alexepico@gmail.com> | 2011-05-03 15:58:09 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-05-03 15:58:09 +0800 |
commit | ef74ee17426d2b7c82a5962c6f554930d015147c (patch) | |
tree | 3753e36efff7fc9feb78bc6c84a4380183abcfc6 /src | |
parent | 8c6cfe9243013e32ee0b3a8e78dd68e6de4df77f (diff) | |
download | libpinyin-ef74ee17426d2b7c82a5962c6f554930d015147c.tar.gz libpinyin-ef74ee17426d2b7c82a5962c6f554930d015147c.tar.xz libpinyin-ef74ee17426d2b7c82a5962c6f554930d015147c.zip |
fixes some error
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/flexible_ngram.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/storage/flexible_ngram.h b/src/storage/flexible_ngram.h index ec55a76..7181d06 100644 --- a/src/storage/flexible_ngram.h +++ b/src/storage/flexible_ngram.h @@ -269,8 +269,6 @@ public: m_magic_header_index[0] = null_token; m_magic_header_index[1] = null_token; - /* Note: remove the below line? */ - assert(sizeof(m_magic_number) == 4 * sizeof(char) ); memcpy(m_magic_number, magic_number, sizeof(m_magic_number)); } @@ -445,10 +443,9 @@ public: if ( ret != 0 ) return false; - if ( 0 == db_data.size ) + if ( sizeof(MagicHeader) != db_data.size ) return false; - assert(sizeof(MagicHeader) == db_data.size); memcpy(&header, db_data.data, sizeof(MagicHeader)); return true; } |