BFS: Made bplustree_header::CheckNode() use const node.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2014, Axel Dörfler, [email protected].
|
* Copyright 2001-2015, Axel Dörfler, [email protected].
|
||||||
* This file may be used under the terms of the MIT License.
|
* This file may be used under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef B_PLUS_TREE_H
|
#ifndef B_PLUS_TREE_H
|
||||||
@@ -50,7 +50,7 @@ struct bplustree_header {
|
|||||||
uint32 MaxNumberOfLevels() const
|
uint32 MaxNumberOfLevels() const
|
||||||
{ return BFS_ENDIAN_TO_HOST_INT32(max_number_of_levels); }
|
{ return BFS_ENDIAN_TO_HOST_INT32(max_number_of_levels); }
|
||||||
|
|
||||||
inline bool CheckNode(bplustree_node* node) const;
|
inline bool CheckNode(const bplustree_node* node) const;
|
||||||
inline bool IsValidLink(off_t link) const;
|
inline bool IsValidLink(off_t link) const;
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
} _PACKED;
|
} _PACKED;
|
||||||
@@ -531,7 +531,7 @@ TreeIterator::GetPreviousEntry(void* key, uint16* keyLength, uint16 maxLength,
|
|||||||
|
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
bplustree_header::CheckNode(bplustree_node* node) const
|
bplustree_header::CheckNode(const bplustree_node* node) const
|
||||||
{
|
{
|
||||||
// sanity checks (links, all_key_count)
|
// sanity checks (links, all_key_count)
|
||||||
return IsValidLink(node->LeftLink())
|
return IsValidLink(node->LeftLink())
|
||||||
|
|||||||
Reference in New Issue
Block a user