Skip to content

Commit

Permalink
Add a comment and rename a function
Browse files Browse the repository at this point in the history
  • Loading branch information
ademakov committed Sep 4, 2018
1 parent 47b28b3 commit c83986a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions evenk/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ static constexpr std::size_t fptr_align = alignof(void (*)());

namespace detail {

static constexpr std::size_t align_size(std::size_t size)
/* A utility to adjust the reserved memory size for tasks. */
static constexpr std::size_t adjust_size(std::size_t size)
{
static_assert((fptr_align & (fptr_align - 1)) == 0,
"function pointer alignment is not a power of two");
Expand Down Expand Up @@ -211,7 +212,7 @@ class trivial_task
public:
using result_type = R;

static constexpr std::size_t memory_size = detail::align_size(S);
static constexpr std::size_t memory_size = detail::adjust_size(S);

constexpr trivial_task() noexcept = default;
constexpr trivial_task(std::nullptr_t) noexcept {}
Expand Down

0 comments on commit c83986a

Please sign in to comment.