Skip to content

Commit 72176f4

Browse files
committed
Add expand method to arraymap and hashmap.
1 parent a9e3dae commit 72176f4

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

include/bitcoin/database/impl/primitives/arraymap.ipp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ Link CLASS::count() const NOEXCEPT
112112
return body_.count();
113113
}
114114

115+
TEMPLATE
116+
bool CLASS::expand(const Link& count) NOEXCEPT
117+
{
118+
return body_.expand(count);
119+
}
120+
115121
// query interface
116122
// ----------------------------------------------------------------------------
117123

include/bitcoin/database/impl/primitives/hashmap.ipp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ Link CLASS::count() const NOEXCEPT
104104
return body_.count();
105105
}
106106

107+
TEMPLATE
108+
bool CLASS::expand(const Link& count) NOEXCEPT
109+
{
110+
return body_.expand(count);
111+
}
112+
107113
// query interface
108114
// ----------------------------------------------------------------------------
109115

include/bitcoin/database/primitives/arraymap.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class arraymap
7373
/// Count of records (or body file bytes if slab).
7474
Link count() const NOEXCEPT;
7575

76+
/// Increase count as neccesary to specified.
77+
bool expand(const Link& count) NOEXCEPT;
78+
7679
/// Errors.
7780
/// -----------------------------------------------------------------------
7881

include/bitcoin/database/primitives/hashmap.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ class hashmap
7474
/// Count of records (or body file bytes if slab).
7575
Link count() const NOEXCEPT;
7676

77+
/// Increase count as neccesary to specified.
78+
bool expand(const Link& count) NOEXCEPT;
79+
7780
/// Errors.
7881
/// -----------------------------------------------------------------------
7982

0 commit comments

Comments
 (0)