[Groonga-commit] groonga/grnxx at 524366b [master] Put aliases and a constant variable in anonymous namespace.

Back to archive index

susumu.yata null+****@clear*****
Mon Jun 17 17:42:28 JST 2013


susumu.yata	2013-06-17 17:42:28 +0900 (Mon, 17 Jun 2013)

  New Revision: 524366bf4e747338432348a5578eb625833a73fb
  https://github.com/groonga/grnxx/commit/524366bf4e747338432348a5578eb625833a73fb

  Message:
    Put aliases and a constant variable in anonymous namespace.

  Modified files:
    lib/grnxx/map/double_array.cpp
    lib/grnxx/map/hash_table.cpp

  Modified: lib/grnxx/map/double_array.cpp (+3 -1)
===================================================================
--- lib/grnxx/map/double_array.cpp    2013-06-17 17:41:21 +0900 (360d933)
+++ lib/grnxx/map/double_array.cpp    2013-06-17 17:42:28 +0900 (8468f96)
@@ -33,6 +33,7 @@
 
 namespace grnxx {
 namespace map {
+namespace {
 
 using double_array::BLOCK_MAX_FAILURE_COUNT;
 using double_array::BLOCK_MAX_LEVEL;
@@ -47,6 +48,8 @@ using double_array::NODE_INVALID_OFFSET;
 
 constexpr uint64_t ROOT_NODE_ID = 0;
 
+}  // namespace
+
 template <typename T>
 Map<T> *DoubleArray<T>::create(Storage *, uint32_t, const MapOptions &) {
   GRNXX_ERROR() << "invalid combination";
@@ -841,7 +844,6 @@ bool DoubleArray<Bytes>::migrate_nodes(Node *node, uint64_t dest_offset,
     // Error.
     return false;
   }
-  // TODO: Copy siblings!
   for (uint64_t i = 0; i < num_labels; ++i) {
     const uint64_t src_node_id = src_offset ^ labels[i];
     Node * const src_node = &src_node_block[src_node_id % BLOCK_SIZE];

  Modified: lib/grnxx/map/hash_table.cpp (+3 -0)
===================================================================
--- lib/grnxx/map/hash_table.cpp    2013-06-17 17:41:21 +0900 (7feafeb)
+++ lib/grnxx/map/hash_table.cpp    2013-06-17 17:42:28 +0900 (5ad41e1)
@@ -32,10 +32,13 @@
 
 namespace grnxx {
 namespace map {
+namespace {
 
 template <typename T>
 using Hash = hash_table::Hash<T>;
 
+}  // namespace
+
 template <typename T>
 HashTable<T>::HashTable()
     : storage_(nullptr),
-------------- next part --------------
HTML����������������������������...
Download 



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