mirror of
https://github.com/XRPLF/rippled.git
synced 2026-02-07 23:42:28 +00:00
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
22 lines
380 B
C++
22 lines
380 B
C++
#pragma once
|
|
|
|
namespace xrpl {
|
|
|
|
template <class T>
|
|
constexpr auto
|
|
kilobytes(T value) noexcept
|
|
{
|
|
return value * 1024;
|
|
}
|
|
|
|
template <class T>
|
|
constexpr auto
|
|
megabytes(T value) noexcept
|
|
{
|
|
return kilobytes(kilobytes(value));
|
|
}
|
|
|
|
static_assert(kilobytes(2) == 2048, "kilobytes(2) == 2048");
|
|
static_assert(megabytes(3) == 3145728, "megabytes(3) == 3145728");
|
|
} // namespace xrpl
|