Skip to content

Commit fb7d6b9

Browse files
committed
refactor(Radix): no redundant static
1 parent 9543810 commit fb7d6b9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/lib/Support/Radix.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ class BigInteger
115115

116116
//------------------------------------------------
117117

118-
static constexpr char baseFNDigits[] =
118+
constexpr char baseFNDigits[] =
119119
"0123456789"
120120
"abcdefghijklmnopqrstuvwxyz";
121121

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

124-
static
125124
std::size_t constexpr
126125
baseFNEncodedSize(
127126
std::size_t n)
@@ -138,7 +137,6 @@ baseFNEncodedSize(
138137
@return The number of characters written to `out`. This
139138
will exclude any null termination.
140139
*/
141-
static
142140
std::size_t
143141
baseFNEncode(
144142
void* dest,
@@ -159,7 +157,6 @@ baseFNEncode(
159157

160158
//------------------------------------------------
161159

162-
static
163160
std::size_t constexpr
164161
base64EncodedSize(
165162
std::size_t n)
@@ -175,7 +172,6 @@ base64EncodedSize(
175172
@return The number of characters written to `out`. This
176173
will exclude any null termination.
177174
*/
178-
static
179175
std::size_t
180176
base64Encode(void* dest, void const* src, std::size_t len)
181177
{
@@ -240,7 +236,7 @@ toBaseFN(
240236
{
241237
dest.resize(baseFNEncodedSize(src.size()));
242238
auto n = baseFNEncode(&dest[0], src.data(), src.size());
243-
return llvm::StringRef(dest.data(), n);
239+
return {dest.data(), n};
244240
}
245241

246242
std::string_view

0 commit comments

Comments
 (0)