summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-26 13:13:56 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-27 18:34:30 +0200
commit7b081a7fc8011c5ce7194fc0eabb8768e0f9d4c6 (patch)
treebff9c5d115f0ad90f6529d8578d71a04d7457248 /scene/gui
parent4cf5bb027678717263476e676cd23f881eef1ca1 (diff)
Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/file_dialog.cpp4
-rw-r--r--scene/gui/texture_button.cpp3
-rw-r--r--scene/gui/texture_progress.cpp22
-rw-r--r--scene/gui/tree.h1
-rw-r--r--scene/gui/video_player.cpp4
5 files changed, 33 insertions, 1 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 283d66d8de..1e9f4df4a3 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -330,6 +330,10 @@ void FileDialog::deselect_items() {
case MODE_OPEN_DIR:
get_ok()->set_text(RTR("Select Current Folder"));
break;
+ case MODE_OPEN_ANY:
+ case MODE_SAVE_FILE:
+ // FIXME: Implement, or refactor to avoid duplication with set_mode
+ break;
}
}
}
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 6bd3b26280..a6a57b010f 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -88,6 +88,9 @@ bool TextureButton::has_point(const Point2 &p_point) const {
scale.y = min;
ofs -= _texture_region.position / min;
} break;
+ default: {
+ // FIXME: Why a switch if we only handle one enum value?
+ }
}
// offset and scale the new point position to adjust it to the bitmask size
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 8188d1dcf8..d28b4065fb 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -229,6 +229,17 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
first_section_size = topleft.y;
last_section_size = bottomright.y;
} break;
+ case FILL_BILINEAR_LEFT_AND_RIGHT: {
+ // TODO: Implement
+ } break;
+ case FILL_BILINEAR_TOP_AND_BOTTOM: {
+ // TODO: Implement
+ } break;
+ case FILL_CLOCKWISE:
+ case FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE:
+ case FILL_COUNTER_CLOCKWISE: {
+ // Those modes are circular, not relevant for nine patch
+ } break;
}
double width_filled = width_total * p_ratio;
@@ -263,6 +274,17 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
dst_rect.size.y = width_filled;
topleft.y = last_section_size;
} break;
+ case FILL_BILINEAR_LEFT_AND_RIGHT: {
+ // TODO: Implement
+ } break;
+ case FILL_BILINEAR_TOP_AND_BOTTOM: {
+ // TODO: Implement
+ } break;
+ case FILL_CLOCKWISE:
+ case FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE:
+ case FILL_COUNTER_CLOCKWISE: {
+ // Those modes are circular, not relevant for nine patch
+ } break;
}
}
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 551600109e..34138acb85 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -53,7 +53,6 @@ public:
CELL_MODE_STRING, ///< just a string
CELL_MODE_CHECK, ///< string + check
CELL_MODE_RANGE, ///< Contains a range
- CELL_MODE_RANGE_EXPRESSION, ///< Contains a range
CELL_MODE_ICON, ///< Contains an icon, not editable
CELL_MODE_CUSTOM, ///< Contains a custom value, show a string, and an edit button
};
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 17ab234551..39e7c73390 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -102,6 +102,10 @@ void VideoPlayer::_mix_audio() {
}
} break;
+ case AudioServer::SPEAKER_SURROUND_31: {
+
+ // FIXME: Implement
+ } break;
case AudioServer::SPEAKER_SURROUND_51: {
AudioFrame *targets[2] = {