Skip to content

Commit 5cee89a

Browse files
author
Matevz Morato
committed
Make HostRunnable a virtual class
1 parent 6168267 commit 5cee89a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/depthai/pipeline/DeviceNode.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class DeviceNodeCRTP : public Base {
103103
friend PipelineImpl;
104104
};
105105

106-
class HostRunnable {};
107-
106+
class HostRunnable {
107+
public:
108+
HostRunnable() = default;
109+
virtual ~HostRunnable(); // Has to be virtual for std::dynamic_cast to be used reliably
110+
};
108111
} // namespace dai

src/pipeline/DeviceNode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,6 @@ dai::LogLevel DeviceNode::getLogLevel() const {
7777
}
7878
}
7979

80+
HostRunnable::~HostRunnable() = default;
81+
8082
} // namespace dai

0 commit comments

Comments
 (0)