summaryrefslogtreecommitdiff
path: root/servers/camera_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/camera_server.cpp')
-rw-r--r--servers/camera_server.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/servers/camera_server.cpp b/servers/camera_server.cpp
index 6f506d0f7a..b83b41a571 100644
--- a/servers/camera_server.cpp
+++ b/servers/camera_server.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "camera_server.h"
+#include "core/variant/typed_array.h"
#include "rendering_server.h"
#include "servers/camera/camera_feed.h"
@@ -124,7 +125,7 @@ void CameraServer::remove_feed(const Ref<CameraFeed> &p_feed) {
#endif
// remove it from our array, if this results in our feed being unreferenced it will be destroyed
- feeds.remove(i);
+ feeds.remove_at(i);
// let whomever is interested know
emit_signal(SNAME("camera_feed_removed"), feed_id);
@@ -143,8 +144,8 @@ int CameraServer::get_feed_count() {
return feeds.size();
};
-Array CameraServer::get_feeds() {
- Array return_feeds;
+TypedArray<CameraFeed> CameraServer::get_feeds() {
+ TypedArray<CameraFeed> return_feeds;
int cc = get_feed_count();
return_feeds.resize(cc);