summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/audio_stream_player_2d.cpp2
-rw-r--r--scene/2d/navigation2d.cpp2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp2
-rw-r--r--scene/3d/navigation.cpp2
-rw-r--r--scene/audio/audio_player.cpp2
-rw-r--r--scene/gui/video_player.cpp2
-rw-r--r--scene/main/node.cpp2
-rw-r--r--scene/main/scene_tree.cpp8
-rw-r--r--scene/resources/bit_mask.cpp6
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/world.cpp4
11 files changed, 17 insertions, 17 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 7d5044d97a..937a026e34 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -21,7 +21,7 @@ void AudioStreamPlayer2D::_mix_audio() {
}
//get data
- AudioFrame *buffer = mix_buffer.ptr();
+ AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
//mix
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index 74d835dfb2..9eff107827 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -150,7 +150,7 @@ void Navigation2D::_navpoly_unlink(int p_id) {
Polygon &p = E->get();
int ec = p.edges.size();
- Polygon::Edge *edges = p.edges.ptr();
+ Polygon::Edge *edges = p.edges.ptrw();
for (int i = 0; i < ec; i++) {
int next = (i + 1) % ec;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 30b7f36352..6c102e4027 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -21,7 +21,7 @@ void AudioStreamPlayer3D::_mix_audio() {
}
//get data
- AudioFrame *buffer = mix_buffer.ptr();
+ AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
//mix
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index b226cca02b..b6507aedb3 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -147,7 +147,7 @@ void Navigation::_navmesh_unlink(int p_id) {
Polygon &p = E->get();
int ec = p.edges.size();
- Polygon::Edge *edges = p.edges.ptr();
+ Polygon::Edge *edges = p.edges.ptrw();
for (int i = 0; i < ec; i++) {
int next = (i + 1) % ec;
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 08b01c6a4c..81962901d9 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -36,7 +36,7 @@ void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
int bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus);
//get data
- AudioFrame *buffer = mix_buffer.ptr();
+ AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
if (p_fadeout) {
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 1b6bd30b58..c7157d539d 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -84,7 +84,7 @@ void VideoPlayer::_mix_audio() {
return;
}
- AudioFrame *buffer = mix_buffer.ptr();
+ AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
// Resample
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 31d423c808..506dc85475 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1198,7 +1198,7 @@ void Node::_validate_child_name(Node *p_child, bool p_force_human_readable) {
unique = false;
} else {
//check if exists
- Node **childs = data.children.ptr();
+ Node **childs = data.children.ptrw();
int cc = data.children.size();
for (int i = 0; i < cc; i++) {
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index d4be683a2b..17abf2425a 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1001,7 +1001,7 @@ Array SceneTree::_get_nodes_in_group(const StringName &p_group) {
ret.resize(nc);
- Node **ptr = E->get().nodes.ptr();
+ Node **ptr = E->get().nodes.ptrw();
for (int i = 0; i < nc; i++) {
ret[i] = ptr[i];
@@ -1024,7 +1024,7 @@ void SceneTree::get_nodes_in_group(const StringName &p_group, List<Node *> *p_li
int nc = E->get().nodes.size();
if (nc == 0)
return;
- Node **ptr = E->get().nodes.ptr();
+ Node **ptr = E->get().nodes.ptrw();
for (int i = 0; i < nc; i++) {
p_list->push_back(ptr[i]);
@@ -1997,9 +1997,9 @@ void SceneTree::_network_process_packet(int p_from, const uint8_t *p_packet, int
Variant::CallError ce;
- node->call(name, argp.ptr(), argc, ce);
+ node->call(name, (const Variant **)argp.ptr(), argc, ce);
if (ce.error != Variant::CallError::CALL_OK) {
- String error = Variant::get_call_error_text(node, name, argp.ptr(), argc, ce);
+ String error = Variant::get_call_error_text(node, name, (const Variant **)argp.ptr(), argc, ce);
error = "RPC - " + error;
ERR_PRINTS(error);
}
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 029a9ef0e8..eebc872dfb 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -38,7 +38,7 @@ void BitMap::create(const Size2 &p_size) {
width = p_size.width;
height = p_size.height;
bitmask.resize(((width * height) / 8) + 1);
- zeromem(bitmask.ptr(), bitmask.size());
+ zeromem(bitmask.ptrw(), bitmask.size());
}
void BitMap::create_from_image_alpha(const Ref<Image> &p_image) {
@@ -51,7 +51,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image) {
create(Size2(img->get_width(), img->get_height()));
PoolVector<uint8_t>::Read r = img->get_data().read();
- uint8_t *w = bitmask.ptr();
+ uint8_t *w = bitmask.ptrw();
for (int i = 0; i < width * height; i++) {
@@ -65,7 +65,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image) {
void BitMap::set_bit_rect(const Rect2 &p_rect, bool p_value) {
Rect2i current = Rect2i(0, 0, width, height).clip(p_rect);
- uint8_t *data = bitmask.ptr();
+ uint8_t *data = bitmask.ptrw();
for (int i = current.position.x; i < current.position.x + current.size.x; i++) {
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 48c6add586..a40417f24d 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -125,7 +125,7 @@ Error DynamicFontAtSize::_load() {
_fontdata[font->font_path] = Vector<uint8_t>();
Vector<uint8_t> &fontdata = _fontdata[font->font_path];
fontdata.resize(len);
- f->get_buffer(fontdata.ptr(), len);
+ f->get_buffer(fontdata.ptrw(), len);
font->set_font_ptr(fontdata.ptr(), len);
f->close();
}
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 86b32a5cdd..c63ba24cbd 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -159,9 +159,9 @@ struct SpatialIndexer {
Vector<Plane> planes = c->get_frustum();
- int culled = octree.cull_convex(planes, cull.ptr(), cull.size());
+ int culled = octree.cull_convex(planes, cull.ptrw(), cull.size());
- VisibilityNotifier **ptr = cull.ptr();
+ VisibilityNotifier **ptr = cull.ptrw();
List<VisibilityNotifier *> added;
List<VisibilityNotifier *> removed;