You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Fix some issues found by cppcheck.
This commit is contained in:
@@ -891,7 +891,7 @@ String TranslationServer::wrap_with_fakebidi_characters(String &p_message) const
|
||||
return res;
|
||||
}
|
||||
|
||||
String TranslationServer::add_padding(String &p_message, int p_length) const {
|
||||
String TranslationServer::add_padding(const String &p_message, int p_length) const {
|
||||
String res;
|
||||
String prefix = pseudolocalization_prefix;
|
||||
String suffix;
|
||||
@@ -921,7 +921,7 @@ const char32_t *TranslationServer::get_accented_version(char32_t p_character) co
|
||||
}
|
||||
|
||||
bool TranslationServer::is_placeholder(String &p_message, int p_index) const {
|
||||
return p_message[p_index] == '%' && p_index < p_message.size() - 1 &&
|
||||
return p_index < p_message.size() - 1 && p_message[p_index] == '%' &&
|
||||
(p_message[p_index + 1] == 's' || p_message[p_index + 1] == 'c' || p_message[p_index + 1] == 'd' ||
|
||||
p_message[p_index + 1] == 'o' || p_message[p_index + 1] == 'x' || p_message[p_index + 1] == 'X' || p_message[p_index + 1] == 'f');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user