summaryrefslogtreecommitdiff
path: root/editor/plugins/text_control_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/text_control_editor_plugin.cpp')
-rw-r--r--editor/plugins/text_control_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp
index 4290888e94..2a5faba4a2 100644
--- a/editor/plugins/text_control_editor_plugin.cpp
+++ b/editor/plugins/text_control_editor_plugin.cpp
@@ -92,8 +92,8 @@ void TextControlEditor::_update_fonts_menu() {
}
int id = FONT_INFO_ID;
- for (Map<String, Map<String, String>>::Element *E = fonts.front(); E; E = E->next()) {
- font_list->add_item(E->key(), id++);
+ for (const KeyValue<String, HashMap<String, String>> &E : fonts) {
+ font_list->add_item(E.key, id++);
}
if (font_list->get_item_count() > 1) {
@@ -107,8 +107,8 @@ void TextControlEditor::_update_styles_menu() {
font_style_list->clear();
if ((font_list->get_selected_id() >= FONT_INFO_ID)) {
const String &name = font_list->get_item_text(font_list->get_selected());
- for (Map<String, String>::Element *E = fonts[name].front(); E; E = E->next()) {
- font_style_list->add_item(E->key());
+ for (KeyValue<String, String> &E : fonts[name]) {
+ font_style_list->add_item(E.key);
}
} else if (font_list->get_selected() >= 0) {
font_style_list->add_item("Default");