Use optional::value() instead of options::get() in test cases
This commit is contained in:
parent
3d1341114b
commit
de5dd8a838
@ -42,7 +42,7 @@ public:
|
|||||||
|
|
||||||
unique_ref<DataInnerNode> LoadInnerNode(const Key &key) {
|
unique_ref<DataInnerNode> LoadInnerNode(const Key &key) {
|
||||||
auto node = std::move(nodeStore->load(key).get());
|
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) {
|
Key CreateNewInnerNodeReturnKey(const DataNode &firstChild) {
|
||||||
@ -91,7 +91,7 @@ public:
|
|||||||
|
|
||||||
unique_ref<DataInnerNode> CopyInnerNode(const DataInnerNode &node) {
|
unique_ref<DataInnerNode> CopyInnerNode(const DataInnerNode &node) {
|
||||||
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
|
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
|
||||||
return std::move(dynamic_pointer_move<DataInnerNode>(copied).get());
|
return dynamic_pointer_move<DataInnerNode>(copied).value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Key InitializeInnerNodeAddLeafReturnKey() {
|
Key InitializeInnerNodeAddLeafReturnKey() {
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
unique_ref<DataLeafNode> LoadLeafNode(const Key &key) {
|
unique_ref<DataLeafNode> LoadLeafNode(const Key &key) {
|
||||||
auto leaf = std::move(nodeStore->load(key).get());
|
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) {
|
void ResizeLeaf(const Key &key, size_t size) {
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
unique_ref<DataLeafNode> CopyLeafNode(const DataLeafNode &node) {
|
unique_ref<DataLeafNode> CopyLeafNode(const DataLeafNode &node) {
|
||||||
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
|
auto copied = nodeStore->createNewNodeAsCopyFrom(node);
|
||||||
return std::move(dynamic_pointer_move<DataLeafNode>(copied).get());
|
return dynamic_pointer_move<DataLeafNode>(copied).value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Key InitializeLeafGrowAndReturnKey() {
|
Key InitializeLeafGrowAndReturnKey() {
|
||||||
|
@ -121,7 +121,7 @@ public:
|
|||||||
if (leaf != none) {
|
if (leaf != none) {
|
||||||
return std::move(*leaf);
|
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());
|
return LastLeaf(inner->LastChild()->key());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ public:
|
|||||||
if (leaf != none) {
|
if (leaf != none) {
|
||||||
return std::move(*leaf);
|
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());
|
return LastLeaf(inner->LastChild()->key());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user