Skip to content

Commit b2fed97

Browse files
fix: compiler warnings and errors
1 parent 24eab5f commit b2fed97

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

source/matplot/core/axes_object.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ namespace matplot {
2929

3030
explicit axes_object(axes_handle parent);
3131

32+
virtual ~axes_object() = default;
33+
3234
public:
3335
virtual double xmax();
3436
virtual double xmin();

source/matplot/util/common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ namespace matplot {
866866

867867
// Initial calculations
868868
if (log) {
869-
std::invalid_argument("Not implemented yet. The library does not "
870-
"need that as it is.");
869+
throw std::invalid_argument("Not implemented yet. The library does "
870+
"not need that as it is.");
871871
}
872872

873873
// Data range

source/matplot/util/common.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,10 @@ namespace matplot {
605605
/// \brief Helper method for determining the whole array size.
606606
/// Required for caching inner vector's size.
607607
std::size_t calculate_size(const vector_2d &vec) {
608-
return std::accumulate(
609-
vec.begin(), vec.end(), (std::size_t)(0),
610-
[](auto cnt, const auto &vec) { return cnt + vec.size(); });
608+
return std::accumulate(vec.begin(), vec.end(), (std::size_t)(0),
609+
[](auto cnt, const auto &inner_vec) {
610+
return cnt + inner_vec.size();
611+
});
611612
}
612613

613614
public:

0 commit comments

Comments
 (0)