Fix error macro calls not ending with semicolon

It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
This commit is contained in:
Rémi Verschelde
2019-06-11 14:49:34 +02:00
parent d8877d2df5
commit 6d16f2f053
52 changed files with 103 additions and 104 deletions
+1 -1
View File
@@ -525,7 +525,7 @@ Color Color::from_hsv(float p_h, float p_s, float p_v, float p_a) const {
float Color::gray() const {
ERR_EXPLAIN("Color.gray() is deprecated and will be removed in a future version. Use Color.get_v() for a better grayscale approximation.");
WARN_DEPRECATED
WARN_DEPRECATED;
return (r + g + b) / 3.0;
}
+1 -1
View File
@@ -348,7 +348,7 @@ uint64_t XMLParser::get_node_offset() const {
Error XMLParser::seek(uint64_t p_pos) {
ERR_FAIL_COND_V(!data, ERR_FILE_EOF)
ERR_FAIL_COND_V(!data, ERR_FILE_EOF);
ERR_FAIL_COND_V(p_pos >= length, ERR_FILE_EOF);
P = data + p_pos;
+3 -3
View File
@@ -489,7 +489,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
memdelete(f);
ERR_EXPLAIN("Corrupted header in binary project.binary (not ECFG)");
ERR_FAIL_V(ERR_FILE_CORRUPT;)
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
uint32_t count = f->get_32();
@@ -640,7 +640,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
if (err != OK) {
ERR_EXPLAIN("Couldn't save project.binary at " + p_file);
ERR_FAIL_COND_V(err, err)
ERR_FAIL_COND_V(err, err);
}
uint8_t hdr[4] = { 'E', 'C', 'F', 'G' };
@@ -732,7 +732,7 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
if (err) {
ERR_EXPLAIN("Couldn't save project.godot - " + p_file);
ERR_FAIL_COND_V(err, err)
ERR_FAIL_COND_V(err, err);
}
file->store_line("; Engine configuration file.");
+3 -3
View File
@@ -179,14 +179,14 @@ public:
while (true) {
while (compare(p_array[p_first], p_pivot)) {
if (Validate) {
ERR_BAD_COMPARE(p_first == unmodified_last - 1)
ERR_BAD_COMPARE(p_first == unmodified_last - 1);
}
p_first++;
}
p_last--;
while (compare(p_pivot, p_array[p_last])) {
if (Validate) {
ERR_BAD_COMPARE(p_last == unmodified_first)
ERR_BAD_COMPARE(p_last == unmodified_first);
}
p_last--;
}
@@ -259,7 +259,7 @@ public:
int next = p_last - 1;
while (compare(p_value, p_array[next])) {
if (Validate) {
ERR_BAD_COMPARE(next == 0)
ERR_BAD_COMPARE(next == 0);
}
p_array[p_last] = p_array[next];
p_last = next;
+1 -1
View File
@@ -150,7 +150,7 @@ template <class T>
bool Vector<T>::push_back(const T &p_elem) {
Error err = resize(size() + 1);
ERR_FAIL_COND_V(err, true)
ERR_FAIL_COND_V(err, true);
set(size() - 1, p_elem);
return false;