Skip to content

Commit

Permalink
refactor(Radix): no redundant static
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Nov 25, 2024
1 parent 9543810 commit fb7d6b9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/lib/Support/Radix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,12 @@ class BigInteger

//------------------------------------------------

static constexpr char baseFNDigits[] =
constexpr char baseFNDigits[] =
"0123456789"
"abcdefghijklmnopqrstuvwxyz";

static constexpr std::size_t baseFN = sizeof(baseFNDigits) - 1;
constexpr std::size_t baseFN = sizeof(baseFNDigits) - 1;

static
std::size_t constexpr
baseFNEncodedSize(
std::size_t n)
Expand All @@ -138,7 +137,6 @@ baseFNEncodedSize(
@return The number of characters written to `out`. This
will exclude any null termination.
*/
static
std::size_t
baseFNEncode(
void* dest,
Expand All @@ -159,7 +157,6 @@ baseFNEncode(

//------------------------------------------------

static
std::size_t constexpr
base64EncodedSize(
std::size_t n)
Expand All @@ -175,7 +172,6 @@ base64EncodedSize(
@return The number of characters written to `out`. This
will exclude any null termination.
*/
static
std::size_t
base64Encode(void* dest, void const* src, std::size_t len)
{
Expand Down Expand Up @@ -240,7 +236,7 @@ toBaseFN(
{
dest.resize(baseFNEncodedSize(src.size()));
auto n = baseFNEncode(&dest[0], src.data(), src.size());
return llvm::StringRef(dest.data(), n);
return {dest.data(), n};
}

std::string_view
Expand Down

0 comments on commit fb7d6b9

Please # to comment.