Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make arena::detach() a NOEXCEPT method #1528

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/bitcoin/system/arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class arena
/// Non-linear allocator just returns zero.
/// Linear allocator returns current allocation size.
/// Detachable linear allocator detaches allocation and returns its size.
virtual size_t detach() THROWS = 0;
virtual size_t detach() NOEXCEPT = 0;

/// Non-linear and linear allocator is a nop.
/// Detachable linear allocator frees the memory associated with memory.
Expand Down Expand Up @@ -94,7 +94,7 @@ class BC_API default_arena final
public:
static arena* get() NOEXCEPT;
void* start(size_t baseline) THROWS override;
size_t detach() THROWS override;
size_t detach() NOEXCEPT override;
void release(void* address) NOEXCEPT override;

private:
Expand Down
2 changes: 1 addition & 1 deletion src/arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void* default_arena::start(size_t) THROWS
return nullptr;
}

size_t default_arena::detach() THROWS
size_t default_arena::detach() NOEXCEPT
{
return zero;
}
Expand Down
4 changes: 2 additions & 2 deletions test/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class reporting_arena
return nullptr;
}

size_t detach() THROWS override
size_t detach() NOEXCEPT override
{
return zero;
}
Expand Down Expand Up @@ -203,7 +203,7 @@ class mock_arena
return nullptr;
}

size_t detach() THROWS override
size_t detach() NOEXCEPT override
{
return zero;
}
Expand Down
Loading