summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/particles_2d.cpp1
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/gui/dialogs.cpp2
-rw-r--r--scene/gui/item_list.cpp2
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/text_edit.cpp2
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
7 files changed, 6 insertions, 7 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 2b39fefe03..77ace0348a 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -229,6 +229,7 @@ ParticleAttractor2D::ParticleAttractor2D() {
/****************************************/
_FORCE_INLINE_ static float _rand_from_seed(uint64_t *seed) {
+
uint32_t r = Math::rand_from_seed(seed);
return 2.0f * (float)r / (float)Math::RANDOM_MAX - 1.0f;
}
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index cffe2ce218..4161725ad5 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2421,8 +2421,6 @@ void Control::get_argument_options(const StringName& p_function,int p_idx,List<S
Theme::get_default()->get_font_list(get_class(),&sn);
} else if (pf=="add_constant_override" || pf=="has_constant" || pf=="has_constant_override" || pf=="get_constant") {
Theme::get_default()->get_constant_list(get_class(),&sn);
- } else if (pf=="add_color_override" || pf=="has_color" || pf=="has_color_override" || pf=="get_color") {
- Theme::get_default()->get_color_list(get_class(),&sn);
}
sn.sort_custom<StringName::AlphCompare>();
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 72d3f0e8f8..e08d933e03 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -201,7 +201,7 @@ void AcceptDialog::_notification(int p_what) {
if (p_what==NOTIFICATION_MODAL_CLOSE) {
cancel_pressed();
- } if (p_what==NOTIFICATION_RESIZED) {
+ } else if (p_what==NOTIFICATION_RESIZED) {
_update_child_rects();
}
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index a35df53e52..91bd16ee0b 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -314,7 +314,7 @@ void ItemList::move_item(int p_item,int p_to_pos) {
if (current<0) {
//do none
- } if (p_item==current) {
+ } else if (p_item==current) {
current=p_to_pos;
} else if (p_to_pos>p_item && current>p_item && current<p_to_pos) {
current--;
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index c675cfbefb..3bdd2cd7e3 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -173,7 +173,7 @@ private:
struct ItemNewline : public Item {
- int line;
+ int line; // FIXME: Overriding base's line ?
ItemNewline() { type=ITEM_NEWLINE; }
};
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 3f2eab8bef..f1b061c506 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4267,7 +4267,7 @@ void TextEdit::_update_completion_candidates() {
//no completion here
//print_line("cancel!");
cancel=true;
- } if (inquote && first_quote!=-1) {
+ } else if (inquote && first_quote!=-1) {
s=l.substr(first_quote,cofs-first_quote);
//print_line("s: 1"+s);
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index feae58d28a..878aafe881 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -986,7 +986,7 @@ void make_default_theme(bool p_hidpi,Ref<Font> p_font) {
Ref<BitmapFont> default_font;
if (p_font.is_valid()) {
default_font=p_font;
- } if (p_hidpi) {
+ } else if (p_hidpi) {
default_font=make_font2(_hidpi_font_height,_hidpi_font_ascent,_hidpi_font_charcount,&_hidpi_font_charrects[0][0],_hidpi_font_kerning_pair_count,&_hidpi_font_kerning_pairs[0][0],_hidpi_font_img_width,_hidpi_font_img_height,_hidpi_font_img_data);
} else {
default_font=make_font2(_lodpi_font_height,_lodpi_font_ascent,_lodpi_font_charcount,&_lodpi_font_charrects[0][0],_lodpi_font_kerning_pair_count,&_lodpi_font_kerning_pairs[0][0],_lodpi_font_img_width,_lodpi_font_img_height,_lodpi_font_img_data);