summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/bit_mask.cpp6
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/world.cpp4
3 files changed, 6 insertions, 6 deletions
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;