Use optional::value() instead of options::get() in test cases

This commit is contained in:
Sebastian Messmer 2015-06-28 16:45:18 +02:00
parent 3d1341114b
commit de5dd8a838
4 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ public:
unique_ref<DataInnerNode> LoadInnerNode(const Key &key) {
auto node = std::move(nodeStore->load(key).get());
return std::move(dynamic_pointer_move<DataInnerNode>(node).get());
return dynamic_pointer_move<DataInnerNode>(node).value();
}
Key CreateNewInnerNodeReturnKey(const DataNode &firstChild) {
@ -91,7 +91,7 @@ public:
unique_ref<DataInnerNode> CopyInnerNode(const DataInnerNode &node) {
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
return std::move(dynamic_pointer_move<DataInnerNode>(copied).get());
return dynamic_pointer_move<DataInnerNode>(copied).value();
}
Key InitializeInnerNodeAddLeafReturnKey() {

View File

@ -78,7 +78,7 @@ public:
unique_ref<DataLeafNode> LoadLeafNode(const Key &key) {
auto leaf = std::move(nodeStore->load(key).get());
return std::move(dynamic_pointer_move<DataLeafNode>(leaf).get());
return dynamic_pointer_move<DataLeafNode>(leaf).value();
}
void ResizeLeaf(const Key &key, size_t size) {
@ -97,7 +97,7 @@ public:
unique_ref<DataLeafNode> CopyLeafNode(const DataLeafNode &node) {
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
return std::move(dynamic_pointer_move<DataLeafNode>(copied).get());
return dynamic_pointer_move<DataLeafNode>(copied).value();
}
Key InitializeLeafGrowAndReturnKey() {

View File

@ -121,7 +121,7 @@ public:
if (leaf != none) {
return std::move(*leaf);
}
auto inner = std::move(dynamic_pointer_move<DataInnerNode>(root).get());
auto inner = dynamic_pointer_move<DataInnerNode>(root).value();
return LastLeaf(inner->LastChild()->key());
}

View File

@ -113,7 +113,7 @@ public:
if (leaf != none) {
return std::move(*leaf);
}
auto inner = std::move(dynamic_pointer_move<DataInnerNode>(root).get());
auto inner = dynamic_pointer_move<DataInnerNode>(root).value();
return LastLeaf(inner->LastChild()->key());
}