diff options
author | Susumu Yata <susumu.yata@gmail.com> | 2018-05-20 04:56:26 +0900 |
---|---|---|
committer | Susumu Yata <susumu.yata@gmail.com> | 2018-05-20 04:56:26 +0900 |
commit | ada836b96f6ad6cdef9afd82212d87c433bccc9a (patch) | |
tree | 23948e6b9107d9900943b0b642b807baf4a50f2b | |
parent | 6f224ba47a331405689fc7bc65eb43d3b179d5a4 (diff) | |
download | marisa-trie-ada836b96f6ad6cdef9afd82212d87c433bccc9a.tar.gz |
Remove null pointer arithmetic to suppress warnings.
-rw-r--r-- | lib/marisa/grimoire/trie/entry.h | 3 | ||||
-rw-r--r-- | tests/trie-test.cc | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/marisa/grimoire/trie/entry.h b/lib/marisa/grimoire/trie/entry.h index 4d91256..2c754a8 100644 --- a/lib/marisa/grimoire/trie/entry.h +++ b/lib/marisa/grimoire/trie/entry.h @@ -9,8 +9,7 @@ namespace trie { class Entry { public: - Entry() - : ptr_(static_cast<const char *>(NULL) - 1), length_(0), id_(0) {} + Entry() : ptr_(NULL), length_(0), id_(0) {} Entry(const Entry &entry) : ptr_(entry.ptr_), length_(entry.length_), id_(entry.id_) {} diff --git a/tests/trie-test.cc b/tests/trie-test.cc index f0adac6..2ca1a74 100644 --- a/tests/trie-test.cc +++ b/tests/trie-test.cc @@ -209,7 +209,6 @@ void TestEntry() { marisa::grimoire::trie::Entry entry; - ASSERT(entry.ptr() == NULL); ASSERT(entry.length() == 0); ASSERT(entry.id() == 0); |