Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure members are initialized properly #39695

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/io/file_access_buffered.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FileAccessBuffered : public FileAccess {
int cache_size = DEFAULT_CACHE_SIZE;

int cache_data_left() const;
mutable Error last_error;
mutable Error last_error = OK;

protected:
Error set_error(Error p_error) const;
Expand Down
4 changes: 2 additions & 2 deletions core/io/file_access_encrypted.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class FileAccessEncrypted : public FileAccess {
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;
Expand Down
4 changes: 2 additions & 2 deletions core/io/file_access_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
6 changes: 3 additions & 3 deletions core/io/pck_packer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class PCKPacker : public Reference {
GDCLASS(PCKPacker, Reference);

FileAccess *file = nullptr;
int alignment;
int alignment = 0;

static void _bind_methods();

struct File {
String path;
String src_path;
int size;
uint64_t offset_offset;
int size = 0;
uint64_t offset_offset = 0;
};
Vector<File> files;

Expand Down