Fix some issues found by cppcheck.
This commit is contained in:
parent
72407a9cfb
commit
f851c4aa33
163 changed files with 776 additions and 767 deletions
|
|
@ -45,7 +45,7 @@ void add_print_handler(PrintHandlerList *p_handler) {
|
|||
_global_unlock();
|
||||
}
|
||||
|
||||
void remove_print_handler(PrintHandlerList *p_handler) {
|
||||
void remove_print_handler(const PrintHandlerList *p_handler) {
|
||||
_global_lock();
|
||||
|
||||
PrintHandlerList *prev = nullptr;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ String stringify_variants(Variant p_var, Args... p_args) {
|
|||
}
|
||||
|
||||
void add_print_handler(PrintHandlerList *p_handler);
|
||||
void remove_print_handler(PrintHandlerList *p_handler);
|
||||
void remove_print_handler(const PrintHandlerList *p_handler);
|
||||
|
||||
extern bool _print_line_enabled;
|
||||
extern bool _print_error_enabled;
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class TranslationServer : public Object {
|
|||
String double_vowels(String &p_message) const;
|
||||
String replace_with_accented_string(String &p_message) const;
|
||||
String wrap_with_fakebidi_characters(String &p_message) const;
|
||||
String add_padding(String &p_message, int p_length) const;
|
||||
String add_padding(const String &p_message, int p_length) const;
|
||||
const char32_t *get_accented_version(char32_t p_character) const;
|
||||
bool is_placeholder(String &p_message, int p_index) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue