Skip to content

Commit b9a4110

Browse files
committed
FIX: Fix GCC shadowing warning
1 parent db2081e commit b9a4110

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

cmake/StandardSettings.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ if(${PROJECT_NAME_UPPERCASE}_ENABLE_LTO)
8282
endif()
8383

8484
option(${PROJECT_NAME_UPPERCASE}_ENABLE_CCACHE "Enable the usage of Ccache, in order to speed up rebuild times." ON)
85-
find_program(CCACHE_FOUND ccache)
86-
if(CCACHE_FOUND)
87-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
88-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
85+
if(${PROJECT_NAME_UPPERCASE}_ENABLE_CCACHE)
86+
find_program(CCACHE_FOUND ccache)
87+
if(CCACHE_FOUND)
88+
message(STATUS "Found and enabled ccache")
89+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
90+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
91+
endif()
8992
endif()

cmake/StaticAnalyzers.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if(${PROJECT_NAME_UPPERCASE}_ENABLE_CLANG_TIDY)
55
CMAKE_CXX_CLANG_TIDY ${CLANGTIDY}
66
-extra-arg=-Wno-unknown-warning-option
77
)
8-
message("Clang-Tidy finished setting up.")
8+
message(STATUS "Clang-Tidy finished setting up.")
99
else()
1010
message(SEND_ERROR "Clang-Tidy requested but executable not found.")
1111
endif()
@@ -31,7 +31,7 @@ if(${PROJECT_NAME_UPPERCASE}_ENABLE_CPPCHECK)
3131
# Ignore third-party dependencies
3232
-i${CMAKE_BINARY_DIR}
3333
)
34-
message("Cppcheck finished setting up.")
34+
message(STATUS "Cppcheck finished setting up.")
3535
else()
3636
message(SEND_ERROR "Cppcheck requested but executable not found.")
3737
endif()

include/databento/datetime.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ std::string DateFromIso8601Int(std::uint32_t date_int);
2020

2121
template <typename T>
2222
struct DateTimeRange {
23-
explicit DateTimeRange(T start) : DateTimeRange{std::move(start), {}} {}
24-
DateTimeRange(T start, T end)
25-
: start{std::move(start)}, end{std::move(end)} {}
23+
explicit DateTimeRange(T start_) : DateTimeRange{std::move(start_), {}} {}
24+
// underscore to prevent shadowing
25+
DateTimeRange(T start_, T end_)
26+
: start{std::move(start_)}, end{std::move(end_)} {}
2627

2728
T start;
2829
T end;

0 commit comments

Comments
 (0)