Skip to content

Commit 99b038f

Browse files
authored
Merge pull request #256 from robotpy/minor-updates
Minor updates
2 parents 9df7b21 + f9174ec commit 99b038f

File tree

7 files changed

+12
-4
lines changed

7 files changed

+12
-4
lines changed

robotpy_build/autowrap/render_cls_rpy_include.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ def render_cls_rpy_include_hpp(ctx: HeaderContext, cls: ClassContext) -> str:
4040
)
4141

4242
if ctx.extra_includes_first:
43-
r.writeln()
43+
r.writeln("\n// from extra_includes_first")
4444
for inc in ctx.extra_includes_first:
4545
r.writeln(f"#include <{inc}>")
4646

47+
r.writeln("\n// wrapped header")
4748
r.writeln(f"\n#include <{ctx.rel_fname}>")
4849

4950
if ctx.extra_includes:
50-
r.writeln()
51+
r.writeln("\n// from extra_includes")
5152
for inc in ctx.extra_includes:
5253
r.writeln(f"#include <{inc}>")
5354

tests/cpp/gen/ft/tbasic.yml

+1-1
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

+1
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

+2
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

+2
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

+1-1
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

+2
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)