Skip to content

Make IGFD::FileDialog's destructor virtual#48

Merged
aiekick merged 1 commit intoaiekick:Lib_Onlyfrom
Jacajack:Lib_Only
Feb 23, 2021
Merged

Make IGFD::FileDialog's destructor virtual#48
aiekick merged 1 commit intoaiekick:Lib_Onlyfrom
Jacajack:Lib_Only

Conversation

@Jacajack
Copy link
Copy Markdown

Hi and thanks for the great library!

I noticed a compilation warning caused by the fact that IGFD::FileDialog has virtual member functions and a non-virtual destructor:

$ clang++ -c ImGuiFileDialog.cpp -I../imgui -Wall
ImGuiFileDialog.cpp:2972:3: warning: delete called on non-final 'IGFD::FileDialog' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
                delete vContext;
                ^
1 warning generated.

While it's not critically important, I made the destructor virtual to avoid any trouble it might cause down the road. I hope this helps somehow :)

@aiekick
Copy link
Copy Markdown
Owner

aiekick commented Feb 23, 2021

ok thanks :)

@aiekick aiekick merged commit a8e552b into aiekick:Lib_Only Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants