mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
Warning for shadowed parameter corrected in common.h
However, not in bundled fmt. Corrects compiling with basic logger with header only and -Werror.
This commit is contained in:
parent
ac8a7bc12d
commit
0f128fd561
@ -20,7 +20,7 @@ message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
|||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
# compiler config
|
# compiler config
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
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("-Wconversion")
|
||||||
add_compile_options("-pedantic")
|
add_compile_options("-pedantic")
|
||||||
add_compile_options("-Wfatal-errors")
|
add_compile_options("-Wfatal-errors")
|
||||||
|
add_compile_options("-Wshadow")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
|
@ -210,10 +210,10 @@ struct source_loc
|
|||||||
, funcname{""}
|
, funcname{""}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
SPDLOG_CONSTEXPR source_loc(const char *filename, int line, const char *funcname)
|
SPDLOG_CONSTEXPR source_loc(const char *t_filename, int t_line, const char *t_funcname)
|
||||||
: filename{filename}
|
: filename{t_filename}
|
||||||
, line{static_cast<uint32_t>(line)}
|
, line{static_cast<uint32_t>(t_line)}
|
||||||
, funcname{funcname}
|
, funcname{t_funcname}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user