Use range iterators for RBSet in most cases

This commit is contained in:
Aaron Record 2022-05-18 17:43:40 -06:00
parent 71c40ff4da
commit 900c676b02
84 changed files with 782 additions and 782 deletions

View file

@ -125,8 +125,8 @@ void SpriteFramesEditor::_sheet_preview_draw() {
Color accent = get_theme_color("accent_color", "Editor");
for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) {
const int idx = E->get();
for (const int &E : frames_selected) {
const int idx = E;
const int x = idx % frame_count.x;
const int y = idx / frame_count.x;
const Point2 pos = draw_offset + Point2(x, y) * (draw_frame_size + draw_sep);
@ -248,8 +248,8 @@ void SpriteFramesEditor::_sheet_add_frames() {
int fc = frames->get_frame_count(edited_anim);
for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) {
int idx = E->get();
for (const int &E : frames_selected) {
int idx = E;
const Point2 frame_coords(idx % frame_count.x, idx / frame_count.x);
Ref<AtlasTexture> at;