Skip to content

Commit 40a327c

Browse files
committed
Fix a couple of missing 'const' specifications on member functions.
1 parent 0f63351 commit 40a327c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/st_format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace _ST_PRIVATE
4747
}
4848

4949
ST_NODISCARD
50-
ST::string to_string(bool utf8_encoded, ST::utf_validation_t validation)
50+
ST::string to_string(bool utf8_encoded, ST::utf_validation_t validation) const
5151
{
5252
return m_output.to_string(utf8_encoded, validation);
5353
}

include/st_format_numeric.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace ST
9898

9999
void format(float_T value, char format)
100100
{
101-
static const char valid_formats[] = "efgEFG";
101+
static constexpr const char valid_formats[] = "efgEFG";
102102
if (!std::char_traits<char>::find(valid_formats, sizeof(valid_formats) - 1, format))
103103
throw ST::bad_format("Unsupported floating-point format specifier");
104104

include/st_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2373,7 +2373,7 @@ namespace ST
23732373
ST_NODISCARD
23742374
string replace(const char8_t *from, const string &to,
23752375
case_sensitivity_t cs = case_sensitive,
2376-
utf_validation_t validation = ST_DEFAULT_VALIDATION)
2376+
utf_validation_t validation = ST_DEFAULT_VALIDATION) const
23772377
{
23782378
return replace(from ? string(from, ST_AUTO_SIZE, validation) : string(), to, cs);
23792379
}

0 commit comments

Comments
 (0)