diff options
Diffstat (limited to 'src/storage/ngram.cpp')
| -rw-r--r-- | src/storage/ngram.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp index c952768..e4bfe8f 100644 --- a/src/storage/ngram.cpp +++ b/src/storage/ngram.cpp @@ -46,14 +46,12 @@ SingleGram::SingleGram(void * buffer, size_t length, bool copy){ } bool SingleGram::get_total_freq(guint32 & total) const{ - char * buf_begin = (char *)m_chunk.begin(); - total = *((guint32 *)buf_begin); + total = m_chunk.get_content<guint32>(0); return true; } bool SingleGram::set_total_freq(guint32 total){ - char * buf_begin = (char *)m_chunk.begin(); - *((guint32 *)buf_begin) = total; + m_chunk.set_content<guint32>(0, total); return true; } |
