mmlr + bonefish + axeld:
* Fixed build: round_up() has been renamed to key_align(). * Whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9083840f34
commit
2b3c0783a0
@ -4,7 +4,7 @@
|
||||
**
|
||||
** Initial version by Axel Dörfler, axeld@pinc-software.de
|
||||
** Roughly based on 'btlib' written by Marcus J. Ranum
|
||||
**
|
||||
**
|
||||
** Copyright (c) 2001-2002 pinc Software. All Rights Reserved.
|
||||
** This file may be used under the terms of the OpenBeOS License.
|
||||
*/
|
||||
@ -110,7 +110,7 @@ struct bplustree_node {
|
||||
enum bplustree_traversing {
|
||||
BPLUSTREE_FORWARD = 1,
|
||||
BPLUSTREE_BACKWARD = -1,
|
||||
|
||||
|
||||
BPLUSTREE_BEGIN = 0,
|
||||
BPLUSTREE_END = 1
|
||||
};
|
||||
@ -292,7 +292,8 @@ bplustree_header::IsValidLink(off_t link)
|
||||
inline uint16 *
|
||||
bplustree_node::KeyLengths() const
|
||||
{
|
||||
return (uint16 *)(((char *)this) + round_up(sizeof(bplustree_node) + AllKeyLength()));
|
||||
return (uint16 *)(((char *)this)
|
||||
+ key_align(sizeof(bplustree_node) + AllKeyLength()));
|
||||
}
|
||||
|
||||
inline off_t *
|
||||
@ -310,10 +311,11 @@ bplustree_node::Keys() const
|
||||
inline int32
|
||||
bplustree_node::Used() const
|
||||
{
|
||||
return round_up(sizeof(bplustree_node) + AllKeyLength()) + NumKeys() * (sizeof(uint16) + sizeof(off_t));
|
||||
return key_align(sizeof(bplustree_node) + AllKeyLength())
|
||||
+ NumKeys() * (sizeof(uint16) + sizeof(off_t));
|
||||
}
|
||||
|
||||
inline bool
|
||||
inline bool
|
||||
bplustree_node::IsLeaf() const
|
||||
{
|
||||
return OverflowLink() == BPLUSTREE_NULL;
|
||||
@ -349,7 +351,7 @@ bplustree_node::MakeLink(uint8 type, off_t link, uint32 fragmentIndex)
|
||||
}
|
||||
|
||||
|
||||
inline bool
|
||||
inline bool
|
||||
bplustree_node::IsDuplicate(off_t link)
|
||||
{
|
||||
return (LinkType(link) & (BPLUSTREE_DUPLICATE_NODE | BPLUSTREE_DUPLICATE_FRAGMENT)) > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user