[Groonga-commit] groonga/grnxx at 1d5ff37 [master] Remove grnxx::map::double_array::Entry.

Back to archive index

susumu.yata null+****@clear*****
Wed Jul 24 16:55:44 JST 2013


susumu.yata	2013-07-24 16:55:44 +0900 (Wed, 24 Jul 2013)

  New Revision: 1d5ff37a5ae51fd9d659a707c3020cfa83d92381
  https://github.com/groonga/grnxx/commit/1d5ff37a5ae51fd9d659a707c3020cfa83d92381

  Message:
    Remove grnxx::map::double_array::Entry.

  Removed files:
    lib/grnxx/map/double_array/entry.hpp
  Modified files:
    lib/grnxx/map/double_array/Makefile.am
    lib/grnxx/map/double_array/dummy.cpp

  Modified: lib/grnxx/map/double_array/Makefile.am (+0 -1)
===================================================================
--- lib/grnxx/map/double_array/Makefile.am    2013-07-24 16:53:32 +0900 (fa45df8)
+++ lib/grnxx/map/double_array/Makefile.am    2013-07-24 16:55:44 +0900 (718d3d0)
@@ -9,5 +9,4 @@ libgrnxx_map_double_array_includedir = ${includedir}/grnxx/map/double_array
 libgrnxx_map_double_array_include_HEADERS =	\
 	block.hpp				\
 	dummy.hpp				\
-	entry.hpp				\
 	node.hpp

  Modified: lib/grnxx/map/double_array/dummy.cpp (+0 -1)
===================================================================
--- lib/grnxx/map/double_array/dummy.cpp    2013-07-24 16:53:32 +0900 (a5568d2)
+++ lib/grnxx/map/double_array/dummy.cpp    2013-07-24 16:55:44 +0900 (69a7e05)
@@ -18,7 +18,6 @@
 #include "grnxx/map/double_array/dummy.hpp"
 
 #include "grnxx/map/double_array/block.hpp"
-#include "grnxx/map/double_array/entry.hpp"
 #include "grnxx/map/double_array/node.hpp"
 
 namespace grnxx {

  Deleted: lib/grnxx/map/double_array/entry.hpp (+0 -75) 100644
===================================================================
--- lib/grnxx/map/double_array/entry.hpp    2013-07-24 16:53:32 +0900 (fcc7666)
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-  Copyright (C) 2012-2013  Brazil, Inc.
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-#ifndef GRNXX_MAP_DOUBLE_ARRAY_ENTRY_HPP
-#define GRNXX_MAP_DOUBLE_ARRAY_ENTRY_HPP
-
-#include "grnxx/features.hpp"
-
-#include "grnxx/types.hpp"
-
-namespace grnxx {
-namespace map {
-namespace double_array {
-
-// The internal structure is as follows:
-// - Common
-//      63 ( 1): is_valid
-// - Valid: is_valid
-//    0-62 (63): bytes_id
-// - Invalid: !is_valid
-//    0-62 (63): next
-// where 0 is the LSB and 63 is the MSB.
-
-class Entry {
-  static constexpr uint64_t IS_VALID_FLAG = 1ULL << 63;
-
- public:
-  Entry() = default;
-
-  static Entry valid_entry(uint64_t bytes_id) {
-    return Entry(IS_VALID_FLAG | bytes_id);
-  }
-  static Entry invalid_entry(uint64_t next) {
-    return Entry(next);
-  }
-
-  // Return true iff the entry is associated with a key.
-  explicit operator bool() const {
-    return value_ & IS_VALID_FLAG;
-  }
-
-  // Return the ID of the associated byte sequence.
-  uint64_t bytes_id() const {
-    return value_ & ~IS_VALID_FLAG;
-  }
-  // Return the next invalid entry.
-  uint64_t next() const {
-    return value_;
-  }
-
- private:
-  uint64_t value_;
-
-  explicit Entry(uint64_t value) : value_(value) {}
-};
-
-}  // namespace double_array
-}  // namespace map
-}  // namespace grnxx
-
-#endif  // GRNXX_MAP_DOUBLE_ARRAY_ENTRY_HPP
-------------- next part --------------
HTML����������������������������...
Download 



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