diff options
-rw-r--r-- | src/storage/ngram.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp index c6b1736..5929ba9 100644 --- a/src/storage/ngram.cpp +++ b/src/storage/ngram.cpp @@ -38,15 +38,15 @@ SingleGram::SingleGram(void * buffer, size_t length){ m_chunk.set_chunk(buffer, length, NULL); } -bool SingleGram::set_total_freq(guint32 total){ +bool SingleGram::get_total_freq(guint32 & total){ char * buf_begin = (char *)m_chunk.begin(); - *((guint32 *)buf_begin) = total; + total = *((guint32 *)buf_begin); return true; } -bool SingleGram::get_total_freq(guint32 & total){ +bool SingleGram::set_total_freq(guint32 total){ char * buf_begin = (char *)m_chunk.begin(); - total = *((guint32 *)buf_begin); + *((guint32 *)buf_begin) = total; return true; } |