summaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-28 13:23:25 +0100
committerGitHub <noreply@github.com>2020-12-28 13:23:25 +0100
commitbe509bf5e4d00b33f2867e6d06a23285b2a8fd29 (patch)
tree975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /scene/gui/tree.cpp
parent886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff)
parent5b937d493f0046543a77a0be7920ad39f1e5fc3c (diff)
Merge pull request #44401 from madmiraal/rename-empty-is_empty
Rename empty() to is_empty()
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r--scene/gui/tree.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index ad4545cf6c..cb9729a5e8 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -163,7 +163,7 @@ void TreeItem::set_text(int p_column, String p_text) {
cells.write[p_column].max = INT_MIN;
for (int i = 0; i < strings.size(); i++) {
int value = i;
- if (!strings[i].get_slicec(':', 1).empty()) {
+ if (!strings[i].get_slicec(':', 1).is_empty()) {
value = strings[i].get_slicec(':', 1).to_int();
}
cells.write[p_column].min = MIN(cells[p_column].min, value);
@@ -1212,7 +1212,7 @@ void Tree::update_item_cell(TreeItem *p_item, int p_col) {
Vector<String> strings = p_item->cells[p_col].text.split(",");
for (int j = 0; j < strings.size(); j++) {
int value = j;
- if (!strings[j].get_slicec(':', 1).empty()) {
+ if (!strings[j].get_slicec(':', 1).is_empty()) {
value = strings[j].get_slicec(':', 1).to_int();
}
if (option == value) {
@@ -2031,7 +2031,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
popup_menu->clear();
for (int i = 0; i < c.text.get_slice_count(","); i++) {
String s = c.text.get_slicec(',', i);
- popup_menu->add_item(s.get_slicec(':', 0), s.get_slicec(':', 1).empty() ? i : s.get_slicec(':', 1).to_int());
+ popup_menu->add_item(s.get_slicec(':', 0), s.get_slicec(':', 1).is_empty() ? i : s.get_slicec(':', 1).to_int());
}
popup_menu->set_size(Size2(col_width, 0));
@@ -2930,7 +2930,7 @@ bool Tree::edit_selected() {
popup_menu->clear();
for (int i = 0; i < c.text.get_slice_count(","); i++) {
String s2 = c.text.get_slicec(',', i);
- popup_menu->add_item(s2.get_slicec(':', 0), s2.get_slicec(':', 1).empty() ? i : s2.get_slicec(':', 1).to_int());
+ popup_menu->add_item(s2.get_slicec(':', 0), s2.get_slicec(':', 1).is_empty() ? i : s2.get_slicec(':', 1).to_int());
}
popup_menu->set_size(Size2(rect.size.width, 0));