-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve comparison about emplace back for node set
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @file src/index/yakushima/include/tool.h | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "yakushima/include/version.h" | ||
|
||
namespace shirakami { | ||
|
||
/** | ||
* @brief compare yakushima version about vinsert_delete and vsplit. | ||
* @return true same | ||
* @return false different | ||
*/ | ||
static inline bool | ||
comp_ver_for_node_verify(yakushima::node_version64_body const left, | ||
yakushima::node_version64_body const right) { | ||
// compare vinsert_delete | ||
if (left.get_vinsert_delete() != right.get_vinsert_delete()) { | ||
return false; | ||
} | ||
// compare vsplit | ||
if (left.get_vsplit() != right.get_vsplit()) { return false; } | ||
// same | ||
return true; | ||
} | ||
|
||
} // namespace shirakami |