Navigation Menu

Skip to content

Commit

Permalink
Put aliases and a constant variable in anonymous namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed Jun 17, 2013
1 parent 3e37e1c commit 524366b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/grnxx/map/double_array.cpp
Expand Up @@ -33,6 +33,7 @@

namespace grnxx {
namespace map {
namespace {

using double_array::BLOCK_MAX_FAILURE_COUNT;
using double_array::BLOCK_MAX_LEVEL;
Expand All @@ -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";
Expand Down Expand Up @@ -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];
Expand Down
3 changes: 3 additions & 0 deletions lib/grnxx/map/hash_table.cpp
Expand Up @@ -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),
Expand Down

0 comments on commit 524366b

Please sign in to comment.