diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
commit | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch) | |
tree | 894c5070a709198ed994db7c7d0c0e124abbc9e5 /editor/plugins/tile_set_editor_plugin.cpp | |
parent | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff) | |
download | redot-engine-4e5310cc60dc17e5ef09e57115ca8236544679e4.tar.gz |
Some code changed with Clang-Tidy
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 4b225fddf5..069d9d25ee 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -263,7 +263,7 @@ void TileSetEditor::_notification(int p_what) { TileSetEditor::TileSetEditor(EditorNode *p_editor) { editor = p_editor; - undo_redo = editor->get_undo_redo(); + undo_redo = EditorNode::get_undo_redo(); current_tile = -1; VBoxContainer *left_container = memnew(VBoxContainer); @@ -829,8 +829,8 @@ void TileSetEditor::_on_workspace_draw() { case EDITMODE_BITMASK: { Color c(1, 0, 0, 0.5); Color ci(0.3, 0.6, 1, 0.5); - for (float x = 0; x < region.size.x / (spacing + size.x); x++) { - for (float y = 0; y < region.size.y / (spacing + size.y); y++) { + for (int x = 0; x < region.size.x / (spacing + size.x); x++) { + for (int y = 0; y < region.size.y / (spacing + size.y); y++) { Vector2 coord(x, y); Point2 anchor(coord.x * (spacing + size.x), coord.y * (spacing + size.y)); anchor += WORKSPACE_MARGIN; @@ -2009,11 +2009,7 @@ bool TileSetEditor::_sort_tiles(Variant p_a, Variant p_b) { return true; } else if (pos_a.y == pos_b.y) { - if (pos_a.x < pos_b.x) { - return true; - } else { - return false; - } + return (pos_a.x < pos_b.x); } else { return false; } |