diff options
author | Peng Wu <alexepico@gmail.com> | 2016-03-03 16:44:19 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-03-03 16:44:26 +0800 |
commit | 9181f558e6aa784d7734a728e1581a16ba36b422 (patch) | |
tree | 33eed6151a61eabdaa176a97d0eb0ad26d1107f1 /src/storage/phrase_large_table3_bdb.cpp | |
parent | 9d0f69f772571e2ea2e3c9f50198d843d07227a8 (diff) | |
download | libpinyin-9181f558e6aa784d7734a728e1581a16ba36b422.tar.gz libpinyin-9181f558e6aa784d7734a728e1581a16ba36b422.tar.xz libpinyin-9181f558e6aa784d7734a728e1581a16ba36b422.zip |
use attach_options function
Diffstat (limited to 'src/storage/phrase_large_table3_bdb.cpp')
-rw-r--r-- | src/storage/phrase_large_table3_bdb.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/storage/phrase_large_table3_bdb.cpp b/src/storage/phrase_large_table3_bdb.cpp index dcbff96..00276d1 100644 --- a/src/storage/phrase_large_table3_bdb.cpp +++ b/src/storage/phrase_large_table3_bdb.cpp @@ -55,14 +55,7 @@ void PhraseLargeTable3::reset() { bool PhraseLargeTable3::attach(const char * dbfile, guint32 flags) { reset(); - u_int32_t db_flags = 0; - - if (flags & ATTACH_READONLY) - db_flags |= DB_RDONLY; - if (flags & ATTACH_READWRITE) - assert(!(flags & ATTACH_READONLY)); - if (flags & ATTACH_CREATE) - db_flags |= DB_CREATE; + u_int32_t db_flags = attach_options(flags); if (!dbfile) return false; |