mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Address some clang-tidy warnings
This commit is contained in:
parent
322c4a5b2b
commit
961652c2e9
17 changed files with 35 additions and 36 deletions
|
@ -59,10 +59,11 @@ void EnrichedString::clear()
|
|||
m_background = irr::video::SColor(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void EnrichedString::operator=(const wchar_t *str)
|
||||
EnrichedString &EnrichedString::operator=(const wchar_t *str)
|
||||
{
|
||||
clear();
|
||||
addAtEnd(translate_string(std::wstring(str)), m_default_color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void EnrichedString::addAtEnd(const std::wstring &s, SColor initial_color)
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
const video::SColor &color = video::SColor(255, 255, 255, 255));
|
||||
EnrichedString(const std::wstring &string,
|
||||
const std::vector<video::SColor> &colors);
|
||||
void operator=(const wchar_t *str);
|
||||
EnrichedString &operator=(const wchar_t *str);
|
||||
|
||||
void clear();
|
||||
|
||||
|
|
|
@ -846,7 +846,7 @@ std::string sanitizeDirName(const std::string &str, const std::string &optional_
|
|||
{
|
||||
std::wstring safe_name = utf8_to_wide(str);
|
||||
|
||||
for (std::wstring disallowed_name : disallowed_dir_names) {
|
||||
for (auto &disallowed_name : disallowed_dir_names) {
|
||||
if (str_equal(safe_name, disallowed_name, true)) {
|
||||
safe_name = utf8_to_wide(optional_prefix) + safe_name;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue