Closed
Description
Issue description
3.x version of #43636
Due using unitialized variables, Godot may behave very strange and cause bugs like #52634.
To prevent such situations, all variables(except maybe buffers) should be initialized in constructor, because it is easy to forget to do it later.
So, initializing all variables in such class
class HashingContext : public Reference {
void *ctx;
int rar;
bool q;
public:
HashingContext() {
ctx = memnew(something);
}
~HashingContext();
};
can be done in this way in 3.x branch
class HashingContext : public Reference {
void *ctx;
int rar;
bool q;
public:
HashingContext() {
ctx = memnew(something);
rar = 0;
q = false;
}
~HashingContext();
};
Do not try to create PR which changes more than ~50-100 lines, because it will be hard to rebase after other users changes and also such small PR should be merged faster into 3.x branch.
Maybe cppcheck html report will be helpful to find such variables - report.zip
Remember to put here info that you work on e.g. core/
or servers/
folder