Skip to content

Commit

Permalink
Merge pull request #2 from mikucionisaau/master
Browse files Browse the repository at this point in the history
fixed warnings about deprecated implicit constructors
  • Loading branch information
petergjoel authored Dec 2, 2020
2 parents 8548eae + c207688 commit dc79aac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ project(libprlearn VERSION 1.0.0 LANGUAGES CXX)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wpedantic")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -Wall -Wpedantic")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -Wall -Wextra -Wpedantic")

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 17)
Expand Down
8 changes: 5 additions & 3 deletions src/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ namespace prlearn {
double _avg = 0;
double _cnt = 0;

inline void addPoints(avg_t other) {
constexpr avg_t() = default;
constexpr avg_t(const avg_t&) = default;

inline void addPoints(const avg_t& other) {
addPoints(other._cnt, other._avg);
}

Expand Down Expand Up @@ -91,8 +94,7 @@ namespace prlearn {

struct qvar_t : private avg_t {

qvar_t() {
};
qvar_t() = default;

qvar_t(double d, double w, double v) {
_avg = d;
Expand Down

0 comments on commit dc79aac

Please sign in to comment.