Skip to content

Commit dc79aac

Browse files
authored
Merge pull request #2 from mikucionisaau/master
fixed warnings about deprecated implicit constructors
2 parents 8548eae + c207688 commit dc79aac

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ project(libprlearn VERSION 1.0.0 LANGUAGES CXX)
66
if(NOT CMAKE_BUILD_TYPE)
77
set(CMAKE_BUILD_TYPE Release)
88
endif(NOT CMAKE_BUILD_TYPE)
9-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wpedantic")
10-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -Wall -Wpedantic")
9+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wpedantic")
10+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -Wall -Wextra -Wpedantic")
1111

1212
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1313
set(CMAKE_CXX_STANDARD 17)

src/structs.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ namespace prlearn {
3939
double _avg = 0;
4040
double _cnt = 0;
4141

42-
inline void addPoints(avg_t other) {
42+
constexpr avg_t() = default;
43+
constexpr avg_t(const avg_t&) = default;
44+
45+
inline void addPoints(const avg_t& other) {
4346
addPoints(other._cnt, other._avg);
4447
}
4548

@@ -91,8 +94,7 @@ namespace prlearn {
9194

9295
struct qvar_t : private avg_t {
9396

94-
qvar_t() {
95-
};
97+
qvar_t() = default;
9698

9799
qvar_t(double d, double w, double v) {
98100
_avg = d;

0 commit comments

Comments
 (0)