Skip to content

Commit 531444f

Browse files
author
Matevz Morato
committed
Clangformat
1 parent 148f682 commit 531444f

File tree

11 files changed

+21
-29
lines changed

11 files changed

+21
-29
lines changed

bindings/python/src/pipeline/PipelineBindings.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,12 @@ void PipelineBindings::bind(pybind11::module& m, void* pCallstack) {
181181
// Check if the node is a ColorCamera or a MonoCamera node and issue a deprecation warning
182182
py::object colorCameraClass = py::module::import("depthai").attr("node").attr("ColorCamera");
183183
py::object monoCameraClass = py::module::import("depthai").attr("node").attr("MonoCamera");
184-
if(class_.is(colorCameraClass)){
185-
PyErr_WarnEx(PyExc_DeprecationWarning,
186-
"ColorCamera node is deprecated. Use Camera node instead.", 1);
184+
if(class_.is(colorCameraClass)) {
185+
PyErr_WarnEx(PyExc_DeprecationWarning, "ColorCamera node is deprecated. Use Camera node instead.", 1);
187186
}
188187

189-
if(class_.is(monoCameraClass)){
190-
PyErr_WarnEx(PyExc_DeprecationWarning,
191-
"MonoCamera node is deprecated. Use Camera node instead.", 1);
188+
if(class_.is(monoCameraClass)) {
189+
PyErr_WarnEx(PyExc_DeprecationWarning, "MonoCamera node is deprecated. Use Camera node instead.", 1);
192190
}
193191
if(isSubclass && !isFromBindings) {
194192
setImplicitPipeline(&p);

examples/cpp/HostNodes/host_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ int main() {
6464
auto camRgb = pipeline.create<dai::node::Camera>()->build(dai::CameraBoardSocket::CAM_A);
6565
auto camMono = pipeline.create<dai::node::Camera>()->build(dai::CameraBoardSocket::CAM_B);
6666

67-
auto streamMerger = pipeline.create<StreamMerger>()->build(*camRgb->requestOutput(std::make_pair(640, 480)),
68-
*camMono->requestOutput(std::make_pair(640, 480)));
67+
auto streamMerger =
68+
pipeline.create<StreamMerger>()->build(*camRgb->requestOutput(std::make_pair(640, 480)), *camMono->requestOutput(std::make_pair(640, 480)));
6969
auto display = pipeline.create<Display>()->build(streamMerger->out);
7070

7171
pipeline.start();

examples/cpp/ImageManip/image_manip_v2_resize.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ int main(int argc, char** argv) {
2020
auto display = pipeline.create<dai::node::Display>();
2121
auto manip = pipeline.create<dai::node::ImageManipV2>();
2222

23-
2423
// Resize to 400x400 and avoid stretching by cropping from the center
2524
manip->initialConfig.setOutputSize(400, 400, dai::ImageManipConfigV2::ResizeMode::CENTER_CROP);
2625
// Set output frame type

include/depthai/pipeline/MessageQueue.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ class MessageQueue : public std::enable_shared_from_this<MessageQueue> {
4343
explicit MessageQueue(std::string name, unsigned int maxSize = 16, bool blocking = true);
4444

4545
MessageQueue(const MessageQueue& c)
46-
: enable_shared_from_this(c), queue(c.queue), name(c.name), callbacks(c.callbacks), uniqueCallbackId(c.uniqueCallbackId){};
46+
: enable_shared_from_this(c), queue(c.queue), name(c.name), callbacks(c.callbacks), uniqueCallbackId(c.uniqueCallbackId) {};
4747
MessageQueue(MessageQueue&& m) noexcept
4848
: enable_shared_from_this(m),
4949
queue(std::move(m.queue)),
5050
name(std::move(m.name)),
5151
callbacks(std::move(m.callbacks)),
52-
uniqueCallbackId(m.uniqueCallbackId){};
52+
uniqueCallbackId(m.uniqueCallbackId) {};
5353

5454
MessageQueue& operator=(const MessageQueue& c) {
5555
queue = c.queue;

include/depthai/utility/LockingQueue.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class LockingQueue {
2626
this->maxSize = maxSize;
2727
this->blocking = blocking;
2828
}
29-
LockingQueue(const LockingQueue& obj) : maxSize(obj.maxSize), blocking(obj.blocking), queue(obj.queue), destructed(obj.destructed){};
30-
LockingQueue(LockingQueue&& obj) noexcept : maxSize(obj.maxSize), blocking(obj.blocking), queue(std::move(obj.queue)), destructed(obj.destructed){};
29+
LockingQueue(const LockingQueue& obj) : maxSize(obj.maxSize), blocking(obj.blocking), queue(obj.queue), destructed(obj.destructed) {};
30+
LockingQueue(LockingQueue&& obj) noexcept : maxSize(obj.maxSize), blocking(obj.blocking), queue(std::move(obj.queue)), destructed(obj.destructed) {};
3131
LockingQueue& operator=(const LockingQueue& obj) {
3232
maxSize = obj.maxSize;
3333
blocking = obj.blocking;

include/depthai/utility/Memory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ holder(std::move(holder)) {}
110110
// memory as interface
111111
class Memory {
112112
public:
113-
virtual ~Memory(){};
113+
virtual ~Memory() {};
114114
virtual span<std::uint8_t> getData() = 0;
115115
virtual span<const std::uint8_t> getData() const = 0;
116116
virtual std::size_t getMaxSize() const = 0;

src/opencv/HolisticRecordReplay.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bool setupHolisticRecord(
106106
std::string nodeName = (nodeParams.video ? "v_" : "b_") + nodeParams.name;
107107
std::string filePath = platform::joinPaths(recordPath, (deviceId + "_").append(nodeName));
108108
outFilenames[nodeName] = filePath;
109-
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
109+
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
110110
if(std::dynamic_pointer_cast<node::Camera>(node) != nullptr || std::dynamic_pointer_cast<node::ColorCamera>(node) != nullptr
111111
|| std::dynamic_pointer_cast<node::MonoCamera>(node) != nullptr) {
112112
Node::Output* output;
@@ -132,7 +132,7 @@ DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
132132
auto cam = std::dynamic_pointer_cast<dai::node::ColorCamera>(node);
133133
maxOutputFrameSize = std::get<0>(cam->getIspSize()) * std::get<1>(cam->getIspSize()) * 3;
134134
}
135-
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
135+
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
136136
auto imageManip = pipeline.create<dai::node::ImageManip>();
137137
imageManip->initialConfig.setFrameType(ImgFrame::Type::NV12);
138138
imageManip->setMaxOutputFrameSize(maxOutputFrameSize);
@@ -288,7 +288,7 @@ bool setupHolisticReplay(Pipeline& pipeline,
288288
}
289289
NodeRecordParams nodeParams = nodeS->getNodeRecordParams();
290290
std::string nodeName = nodeParams.name;
291-
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
291+
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
292292
if(std::dynamic_pointer_cast<node::Camera>(node) != nullptr || std::dynamic_pointer_cast<node::ColorCamera>(node) != nullptr
293293
|| std::dynamic_pointer_cast<node::MonoCamera>(node) != nullptr) {
294294
auto replay = pipeline.create<dai::node::ReplayVideo>();
@@ -313,7 +313,7 @@ DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
313313
cam->setMockIspSize(width, height);
314314
}
315315
}
316-
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
316+
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
317317
replay->out.link(nodeS->getReplayInput());
318318
} else {
319319
auto replay = pipeline.create<dai::node::ReplayMetadataOnly>();

src/pipeline/Node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Node::OutputMap::OutputMap(Node& parent, std::string name, Node::OutputDescripti
304304
}
305305
}
306306

307-
Node::OutputMap::OutputMap(Node& parent, Node::OutputDescription defaultOutput, bool ref) : OutputMap(parent, "", std::move(defaultOutput), ref){};
307+
Node::OutputMap::OutputMap(Node& parent, Node::OutputDescription defaultOutput, bool ref) : OutputMap(parent, "", std::move(defaultOutput), ref) {};
308308

309309
Node::Output& Node::OutputMap::operator[](const std::string& key) {
310310
if(count({name, key}) == 0) {
@@ -336,7 +336,7 @@ Node::InputMap::InputMap(Node& parent, std::string name, Node::InputDescription
336336
parent.setInputMapRefs(this);
337337
}
338338

339-
Node::InputMap::InputMap(Node& parent, Node::InputDescription description) : InputMap(parent, "", std::move(description)){};
339+
Node::InputMap::InputMap(Node& parent, Node::InputDescription description) : InputMap(parent, "", std::move(description)) {};
340340

341341
Node::Input& Node::InputMap::operator[](const std::string& key) {
342342
if(count({name, key}) == 0) {

src/pipeline/node/DetectionNetwork.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ namespace node {
2727
//--------------------------------------------------------------------
2828

2929
DetectionNetwork::DetectionNetwork(const std::shared_ptr<Device>& device)
30-
: DeviceNodeGroup(device),
31-
out{detectionParser->out},
32-
outNetwork{neuralNetwork->out},
33-
input{neuralNetwork->input},
34-
passthrough{neuralNetwork->passthrough} {};
30+
: DeviceNodeGroup(device), out{detectionParser->out}, outNetwork{neuralNetwork->out}, input{neuralNetwork->input}, passthrough{neuralNetwork->passthrough} {
31+
};
3532

3633
// -------------------------------------------------------------------
3734
// Neural Network API

tests/src/ondevice_tests/color_camera_node_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
#include "depthai/pipeline/InputQueue.hpp"
77
#include "depthai/utility/CompilerWarnings.hpp"
88

9-
109
TEST_CASE("Test ColorCamera node") {
1110
using namespace std;
1211
using namespace std::chrono;
1312
using namespace std::chrono_literals;
1413

1514
dai::Pipeline p;
16-
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
15+
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
1716
auto colorCam = p.create<dai::node::ColorCamera>();
18-
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
17+
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
1918

2019
int previewWidth = 0;
2120
int previewHeight = 0;

0 commit comments

Comments
 (0)