You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
This commit is contained in:
@@ -125,7 +125,7 @@ void SpriteFramesEditor::_sheet_preview_draw() {
|
||||
|
||||
Color accent = get_theme_color("accent_color", "Editor");
|
||||
|
||||
for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) {
|
||||
for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) {
|
||||
const int idx = E->get();
|
||||
const int x = idx % frame_count.x;
|
||||
const int y = idx / frame_count.x;
|
||||
@@ -248,7 +248,7 @@ void SpriteFramesEditor::_sheet_add_frames() {
|
||||
|
||||
int fc = frames->get_frame_count(edited_anim);
|
||||
|
||||
for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) {
|
||||
for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) {
|
||||
int idx = E->get();
|
||||
const Point2 frame_coords(idx % frame_count.x, idx / frame_count.x);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user