Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions robotpy_build/autowrap/render_cls_rpy_include.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ def render_cls_rpy_include_hpp(ctx: HeaderContext, cls: ClassContext) -> str:
)

if ctx.extra_includes_first:
r.writeln()
r.writeln("\n// from extra_includes_first")
for inc in ctx.extra_includes_first:
r.writeln(f"#include <{inc}>")

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

if ctx.extra_includes:
r.writeln()
r.writeln("\n// from extra_includes")
for inc in ctx.extra_includes:
r.writeln(f"#include <{inc}>")

Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/gen/ft/tbasic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ classes:
t:
template_inline_code: |
cls_TBasic
.def("__repr__", [=](const TBasic<T> &self){
.def("__repr__", [this](const TBasic<T> &self){
// checking to see if clsName is available
return "<" + clsName + ">";
});
Expand Down
1 change: 1 addition & 0 deletions tests/cpp/rpytest/ft/include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct Abstract
struct PrivateAbstract
{
PrivateAbstract() {}
virtual ~PrivateAbstract() = default;

static int getPrivateOverride(PrivateAbstract *p) {
return p->mustOverrideMe();
Expand Down
2 changes: 2 additions & 0 deletions tests/cpp/rpytest/ft/include/buffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
class Buffers {
public:

virtual ~Buffers() = default;

// in
void set_buffer(const uint8_t *data, size_t len) {
m_buf.resize(len);
Expand Down
2 changes: 2 additions & 0 deletions tests/cpp/rpytest/ft/include/lifetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <memory>

struct LTWithVirtual {
virtual ~LTWithVirtual() = default;

virtual bool get_bool() {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/rpytest/ft/include/ns_hidden.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace o {
virtual ~O() = default;
};

class AnotherC;
struct AnotherC;
};

namespace n::h {
Expand Down
2 changes: 2 additions & 0 deletions tests/cpp/rpytest/ft/include/templates/tvbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ struct TVParam {
template <typename T>
struct TVBase {

virtual ~TVBase() = default;

virtual std::string get(T t) const {
return "TVBase " + std::to_string(t.get());
}
Expand Down