diff options
Diffstat (limited to 'src/storage/flexible_single_gram.h')
-rw-r--r-- | src/storage/flexible_single_gram.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/storage/flexible_single_gram.h b/src/storage/flexible_single_gram.h index ded2c50..099a826 100644 --- a/src/storage/flexible_single_gram.h +++ b/src/storage/flexible_single_gram.h @@ -42,8 +42,11 @@ class FlexibleSingleGram{ friend class FlexibleBigram; private: MemoryChunk m_chunk; - FlexibleSingleGram(void * buffer, size_t length){ - m_chunk.set_chunk(buffer, length, NULL); + FlexibleSingleGram(void * buffer, size_t length, bool copy){ + if (copy) + m_chunk.set_content(0, buffer, length); + else + m_chunk.set_chunk(buffer, length, NULL); } public: /** |