Skip to content

Commit f9174ec

Browse files
committed
Fix warnings in tests
1 parent b2c5312 commit f9174ec

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

tests/cpp/gen/ft/tbasic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ classes:
77
t:
88
template_inline_code: |
99
cls_TBasic
10-
.def("__repr__", [=](const TBasic<T> &self){
10+
.def("__repr__", [this](const TBasic<T> &self){
1111
// checking to see if clsName is available
1212
return "<" + clsName + ">";
1313
});

tests/cpp/rpytest/ft/include/abstract.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ struct Abstract
88
struct PrivateAbstract
99
{
1010
PrivateAbstract() {}
11+
virtual ~PrivateAbstract() = default;
1112

1213
static int getPrivateOverride(PrivateAbstract *p) {
1314
return p->mustOverrideMe();

tests/cpp/rpytest/ft/include/buffers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
class Buffers {
77
public:
88

9+
virtual ~Buffers() = default;
10+
911
// in
1012
void set_buffer(const uint8_t *data, size_t len) {
1113
m_buf.resize(len);

tests/cpp/rpytest/ft/include/lifetime.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <memory>
44

55
struct LTWithVirtual {
6+
virtual ~LTWithVirtual() = default;
7+
68
virtual bool get_bool() {
79
return false;
810
}

tests/cpp/rpytest/ft/include/ns_hidden.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace o {
1212
virtual ~O() = default;
1313
};
1414

15-
class AnotherC;
15+
struct AnotherC;
1616
};
1717

1818
namespace n::h {

tests/cpp/rpytest/ft/include/templates/tvbase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ struct TVParam {
1010
template <typename T>
1111
struct TVBase {
1212

13+
virtual ~TVBase() = default;
14+
1315
virtual std::string get(T t) const {
1416
return "TVBase " + std::to_string(t.get());
1517
}

0 commit comments

Comments
 (0)