You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
This commit is contained in:
@@ -3427,7 +3427,7 @@ bool WaylandThread::window_get_idle_inhibition(DisplayServer::WindowID p_window_
|
||||
WaylandThread::ScreenData WaylandThread::screen_get_data(int p_screen) const {
|
||||
ERR_FAIL_INDEX_V(p_screen, registry.wl_outputs.size(), ScreenData());
|
||||
|
||||
return wl_output_get_screen_state(registry.wl_outputs[p_screen])->data;
|
||||
return wl_output_get_screen_state(registry.wl_outputs.get(p_screen))->data;
|
||||
}
|
||||
|
||||
int WaylandThread::get_screen_count() const {
|
||||
|
||||
Reference in New Issue
Block a user