@@ -183,16 +183,16 @@ class Parser
183
183
template <typename StringType>
184
184
std::optional<fly::Json> Parser::parse_string (const StringType &contents)
185
185
{
186
- using CharType = typename StringType::value_type;
186
+ using char_type = typename StringType::value_type;
187
187
188
- if constexpr (std::is_same_v<CharType , std::ios::char_type>)
188
+ if constexpr (std::is_same_v<char_type , std::ios::char_type>)
189
189
{
190
- std::basic_istringstream<CharType > stream (contents);
190
+ std::basic_istringstream<char_type > stream (contents);
191
191
return parse_stream (std::move (stream));
192
192
}
193
193
else
194
194
{
195
- auto utf8_contents = fly::BasicString<StringType >::template convert<std::string>(contents);
195
+ auto utf8_contents = fly::BasicString<char_type >::template convert<std::string>(contents);
196
196
return utf8_contents ? parse_string (*utf8_contents) : std::nullopt;
197
197
}
198
198
}
@@ -201,19 +201,19 @@ std::optional<fly::Json> Parser::parse_string(const StringType &contents)
201
201
template <typename StringType, std::endian Endianness>
202
202
std::optional<std::string> Parser::ensure_utf8 (std::istream &stream) const
203
203
{
204
- using CharType = typename StringType::value_type;
204
+ using char_type = typename StringType::value_type;
205
205
206
- static constexpr const std::uint8_t s_char_size = sizeof (CharType );
206
+ static constexpr const std::uint8_t s_char_size = sizeof (char_type );
207
207
StringType contents;
208
208
209
209
while (stream)
210
210
{
211
- CharType character = 0 ;
211
+ char_type character = 0 ;
212
212
213
213
for (std::uint8_t i = 0 ; stream && (i < s_char_size); ++i)
214
214
{
215
215
const std::uint8_t shift = 8 * (s_char_size - i - 1 );
216
- character |= static_cast <CharType >(stream.get () & 0xff ) << shift;
216
+ character |= static_cast <char_type >(stream.get () & 0xff ) << shift;
217
217
}
218
218
219
219
if (stream)
@@ -227,7 +227,7 @@ std::optional<std::string> Parser::ensure_utf8(std::istream &stream) const
227
227
}
228
228
}
229
229
230
- return fly::BasicString<StringType >::template convert<std::string>(contents);
230
+ return fly::BasicString<char_type >::template convert<std::string>(contents);
231
231
}
232
232
233
233
// ==================================================================================================
0 commit comments