There was an error while loading. Please reload this page.
1 parent 5e26d7c commit 439f836Copy full SHA for 439f836
include/godot_cpp/templates/list.hpp
@@ -523,6 +523,11 @@ class List {
523
}
524
525
526
+// Index operator, kept for compatibility.
527
+_FORCE_INLINE_ T &operator[](int p_index) {
528
+return get(p_index);
529
+}
530
+
531
// Random access to elements, use with care,
532
// do not use for iteration.
533
T &get(int p_index) {
@@ -538,6 +543,11 @@ class List {
538
543
return I->get();
539
544
540
545
546
547
+_FORCE_INLINE_ const T &operator[](int p_index) const {
548
549
550
541
551
542
552
553
const T &get(int p_index) const {
0 commit comments