Navigation Menu

Skip to content

Commit

Permalink
Remove a using from KeyStore<T> to KeyArray.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed Jun 17, 2013
1 parent 6344da4 commit 3e37e1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/grnxx/map/hash_table.cpp
Expand Up @@ -330,7 +330,7 @@ bool HashTable<T>::create_map(Storage *storage, uint32_t storage_node_id,
*header_ = Header();
key_ids_.reset(KeyIDArray::create(storage, storage_node_id_,
KeyIDArray::page_size() - 1));
keys_.reset(KeyArray::create(storage, storage_node_id_));
keys_.reset(KeyStore<T>::create(storage, storage_node_id_));
if (!key_ids_ || !keys_) {
storage->unlink_node(storage_node_id_);
return false;
Expand All @@ -355,7 +355,7 @@ bool HashTable<T>::open_map(Storage *storage, uint32_t storage_node_id) {
storage_node_id_ = storage_node_id;
header_ = static_cast<Header *>(storage_node.body());
key_ids_.reset(KeyIDArray::open(storage, header_->key_ids_storage_node_id));
keys_.reset(KeyArray::open(storage, header_->keys_storage_node_id));
keys_.reset(KeyStore<T>::open(storage, header_->keys_storage_node_id));
if (!key_ids_ || !keys_) {
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/grnxx/map/hash_table.hpp
Expand Up @@ -42,7 +42,6 @@ template <typename T>
class HashTable : public Map<T> {
using Header = hash_table::Header;
using KeyIDArray = typename hash_table::KeyIDArray<T>;
using KeyArray = KeyStore<T>;

public:
using Key = typename Map<T>::Key;
Expand Down Expand Up @@ -79,7 +78,7 @@ class HashTable : public Map<T> {
Header *header_;
std::unique_ptr<KeyIDArray> key_ids_;
std::unique_ptr<KeyIDArray> old_key_ids_;
std::unique_ptr<KeyArray> keys_;
std::unique_ptr<KeyStore<T>> keys_;

bool create_map(Storage *storage, uint32_t storage_node_id,
const MapOptions &options);
Expand Down

0 comments on commit 3e37e1c

Please sign in to comment.