Fixed some memory leaks and uses of uninitialized values
This commit is contained in:
parent
48156cb4bf
commit
0cc326bcc9
12 changed files with 28 additions and 21 deletions
|
|
@ -40,10 +40,10 @@ bool EllipseDrawEditTool::edit_gui(const std::shared_ptr<DrawComponent>& comp) {
|
|||
});
|
||||
}
|
||||
t.gui.pop_id();
|
||||
|
||||
bool editHappened = a->d != oldData;
|
||||
|
||||
bool editHappened = (!oldData.has_value()) || (a->d != oldData);
|
||||
oldData = a->d;
|
||||
return editHappened;
|
||||
return editHappened;
|
||||
}
|
||||
|
||||
void EllipseDrawEditTool::edit_start(EditTool& editTool, const std::shared_ptr<DrawComponent>& comp, std::any& prevData) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue