diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/file_access_encrypted.h | 4 | ||||
-rw-r--r-- | core/io/file_access_memory.h | 4 | ||||
-rw-r--r-- | core/io/image.cpp | 12 | ||||
-rw-r--r-- | core/io/image.h | 4 | ||||
-rw-r--r-- | core/io/packed_data_container.h | 2 | ||||
-rw-r--r-- | core/io/pck_packer.h | 8 |
6 files changed, 17 insertions, 17 deletions
diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h index fddc6842f3..c760933038 100644 --- a/core/io/file_access_encrypted.h +++ b/core/io/file_access_encrypted.h @@ -47,8 +47,8 @@ private: Vector<uint8_t> key; bool writing = false; FileAccess *file = nullptr; - size_t base; - size_t length; + size_t base = 0; + size_t length = 0; Vector<uint8_t> data; mutable int pos = 0; mutable bool eofed = false; diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h index 1a9bd3fbbb..47012b4e83 100644 --- a/core/io/file_access_memory.h +++ b/core/io/file_access_memory.h @@ -35,8 +35,8 @@ class FileAccessMemory : public FileAccess { uint8_t *data = nullptr; - int length; - mutable int pos; + int length = 0; + mutable int pos = 0; static FileAccess *create(); diff --git a/core/io/image.cpp b/core/io/image.cpp index f3c87a0f2d..6dde25af32 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2766,8 +2766,8 @@ Dictionary Image::_get_data() const { return d; } -Color Image::get_pixelv(const Point2 &p_src) const { - return get_pixel(p_src.x, p_src.y); +Color Image::get_pixelv(const Point2i &p_point) const { + return get_pixel(p_point.x, p_point.y); } Color Image::_get_color_at_ofs(const uint8_t *ptr, uint32_t ofs) const { @@ -2976,8 +2976,8 @@ Color Image::get_pixel(int p_x, int p_y) const { return _get_color_at_ofs(data.ptr(), ofs); } -void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) { - set_pixel(p_dst.x, p_dst.y, p_color); +void Image::set_pixelv(const Point2i &p_point, const Color &p_color) { + set_pixel(p_point.x, p_point.y, p_color); } void Image::set_pixel(int p_x, int p_y, const Color &p_color) { @@ -3132,9 +3132,9 @@ void Image::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &Image::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &Image::_get_data); - ClassDB::bind_method(D_METHOD("get_pixelv", "src"), &Image::get_pixelv); + ClassDB::bind_method(D_METHOD("get_pixelv", "point"), &Image::get_pixelv); ClassDB::bind_method(D_METHOD("get_pixel", "x", "y"), &Image::get_pixel); - ClassDB::bind_method(D_METHOD("set_pixelv", "dst", "color"), &Image::set_pixelv); + ClassDB::bind_method(D_METHOD("set_pixelv", "point", "color"), &Image::set_pixelv); ClassDB::bind_method(D_METHOD("set_pixel", "x", "y", "color"), &Image::set_pixel); ClassDB::bind_method(D_METHOD("load_png_from_buffer", "buffer"), &Image::load_png_from_buffer); diff --git a/core/io/image.h b/core/io/image.h index c5ec74f02f..c4c84589e5 100644 --- a/core/io/image.h +++ b/core/io/image.h @@ -387,9 +387,9 @@ public: UsedChannels detect_used_channels(CompressSource p_source = COMPRESS_SOURCE_GENERIC); void optimize_channels(); - Color get_pixelv(const Point2 &p_src) const; + Color get_pixelv(const Point2i &p_point) const; Color get_pixel(int p_x, int p_y) const; - void set_pixelv(const Point2 &p_dst, const Color &p_color); + void set_pixelv(const Point2i &p_point, const Color &p_color); void set_pixel(int p_x, int p_y, const Color &p_color); void set_as_black(); diff --git a/core/io/packed_data_container.h b/core/io/packed_data_container.h index b784abcd16..3899c14bb4 100644 --- a/core/io/packed_data_container.h +++ b/core/io/packed_data_container.h @@ -84,7 +84,7 @@ class PackedDataContainerRef : public Reference { GDCLASS(PackedDataContainerRef, Reference); friend class PackedDataContainer; - uint32_t offset; + uint32_t offset = 0; Ref<PackedDataContainer> from; protected: diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h index c1026c2499..56be1b52df 100644 --- a/core/io/pck_packer.h +++ b/core/io/pck_packer.h @@ -39,7 +39,7 @@ class PCKPacker : public Reference { GDCLASS(PCKPacker, Reference); FileAccess *file = nullptr; - int alignment; + int alignment = 0; uint64_t ofs = 0; Vector<uint8_t> key; @@ -50,9 +50,9 @@ class PCKPacker : public Reference { struct File { String path; String src_path; - uint64_t ofs; - uint64_t size; - bool encrypted; + uint64_t ofs = 0; + uint64_t size = 0; + bool encrypted = false; Vector<uint8_t> md5; }; Vector<File> files; |