diff --git a/CMakeLists.txt b/CMakeLists.txt index f0ddaeef..a35de32a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) #--------------------------------------------------------------------------------------- # compiler config #--------------------------------------------------------------------------------------- -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -30,6 +30,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH add_compile_options("-Wconversion") add_compile_options("-pedantic") add_compile_options("-Wfatal-errors") + add_compile_options("-Wshadow") endif() #--------------------------------------------------------------------------------------- diff --git a/include/spdlog/common.h b/include/spdlog/common.h index d078a1ab..49d2b865 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -210,10 +210,10 @@ struct source_loc , funcname{""} { } - SPDLOG_CONSTEXPR source_loc(const char *filename, int line, const char *funcname) - : filename{filename} - , line{static_cast(line)} - , funcname{funcname} + SPDLOG_CONSTEXPR source_loc(const char *t_filename, int t_line, const char *t_funcname) + : filename{t_filename} + , line{static_cast(t_line)} + , funcname{t_funcname} { }