[Groonga-commit] groonga/grnxx [master] Fix grnxx::alpha::DoubleArray.

Back to archive index

susumu.yata null+****@clear*****
Thu Feb 7 19:25:24 JST 2013


susumu.yata	2013-02-07 19:25:24 +0900 (Thu, 07 Feb 2013)

  New Revision: 5731f0a6a87d548b383129158aa4b02ea5cd78aa
  https://github.com/groonga/grnxx/commit/5731f0a6a87d548b383129158aa4b02ea5cd78aa

  Log:
    Fix grnxx::alpha::DoubleArray.

  Modified files:
    lib/alpha/double_array.cpp
    lib/alpha/double_array.hpp

  Modified: lib/alpha/double_array.cpp (+0 -4)
===================================================================
--- lib/alpha/double_array.cpp    2013-02-07 16:46:04 +0900 (3c6df15)
+++ lib/alpha/double_array.cpp    2013-02-07 19:25:24 +0900 (33574de)
@@ -455,10 +455,6 @@ uint64_t DoubleArrayImpl::insert_node(uint64_t node_id, uint16_t label) {
 //    GRN_DAT_DEBUG_THROW_IF(nodes_[offset ^ child_label).label() != child_label);
     siblings_[next] = child_label;
     nodes_[next].set_has_sibling(true);
-if (label == 0) {
-  GRNXX_ERROR();
-  GRNXX_THROW();
-}
     nodes_[node_id].set_child(label);
   } else {
     uint64_t prev = offset ^ child_label;

  Modified: lib/alpha/double_array.hpp (+1 -1)
===================================================================
--- lib/alpha/double_array.hpp    2013-02-07 16:46:04 +0900 (724be76)
+++ lib/alpha/double_array.hpp    2013-02-07 19:25:24 +0900 (40507d4)
@@ -217,7 +217,7 @@ class DoubleArrayNode {
   }
   void set_is_phantom(bool value) {
     if (value) {
-      qword_ |= IS_PHANTOM_FLAG;
+      qword_ = (qword_ & IS_ORIGIN_FLAG) | IS_PHANTOM_FLAG;
     } else {
       qword_ = (qword_ & IS_ORIGIN_FLAG) |
           (DOUBLE_ARRAY_INVALID_OFFSET << OFFSET_SHIFT) |
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index