Skip to content

Commit 4a4f296

Browse files
committed
Add test compile warning flag effc++ and fix findings
1 parent a8d750e commit 4a4f296

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/Gamepad.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace raylib {
1212
*/
1313
class Gamepad {
1414
public:
15-
Gamepad(int gamepadNumber = 0) { set(gamepadNumber); }
15+
Gamepad(int gamepadNumber = 0) : number(gamepadNumber) {};
1616
int number;
1717

1818
GETTERSETTER(int, Number, number)

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ add_executable(raylib_cpp_test raylib_cpp_test.cpp)
88
if (MSVC)
99
target_compile_options(raylib_cpp_test PRIVATE /Wall /W4)
1010
else()
11-
target_compile_options(raylib_cpp_test PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion)
11+
target_compile_options(raylib_cpp_test PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion -Weffc++)
1212
endif()
1313
target_link_libraries(raylib_cpp_test raylib_cpp raylib)
1414

0 commit comments

Comments
 (0)