Skip to content

Commit a55a641

Browse files
Fix -Wnon-virtual-dtor warning (#79).
1 parent edc32d9 commit a55a641

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

include/plog/Record.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ namespace plog
205205
return m_file;
206206
}
207207

208+
virtual ~Record() // virtual destructor to satisfy -Wnon-virtual-dtor warning
209+
{
210+
}
211+
208212
private:
209213
util::Time m_time;
210214
const Severity m_severity;

samples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if(MSVC)
3333
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX")
3434
string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
3535
elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
36-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wconversion -pedantic -Werror")
36+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wconversion -Wnon-virtual-dtor -pedantic -Werror")
3737
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
3838
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
3939
checkObjCXX()

0 commit comments

Comments
 (0)