Skip to content

Commit e0ee68e

Browse files
authored
VisionIpcClient: standardize opening brace spacing (#656)
standardize opening brace spacing
1 parent a16cf1f commit e0ee68e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

msgq/visionipc/visionipc_client.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ VisionIpcClient::VisionIpcClient(std::string name, VisionStreamType type, bool c
3131
}
3232

3333
// Connect is not thread safe. Do not use the buffers while calling connect
34-
bool VisionIpcClient::connect(bool blocking){
34+
bool VisionIpcClient::connect(bool blocking) {
3535
connected = false;
3636

3737
// Cleanup old buffers on reconnect
38-
for (size_t i = 0; i < num_buffers; i++){
38+
for (size_t i = 0; i < num_buffers; i++) {
3939
if (buffers[i].free() != 0) {
4040
LOGE("Failed to free buffer %zu", i);
4141
}
@@ -66,7 +66,7 @@ bool VisionIpcClient::connect(bool blocking){
6666
assert(r == sizeof(VisionBuf) * num_buffers);
6767

6868
// Import buffers
69-
for (size_t i = 0; i < num_buffers; i++){
69+
for (size_t i = 0; i < num_buffers; i++) {
7070
buffers[i] = bufs[i];
7171
buffers[i].fd = fds[i];
7272
buffers[i].import();
@@ -80,15 +80,15 @@ bool VisionIpcClient::connect(bool blocking){
8080
return true;
8181
}
8282

83-
VisionBuf * VisionIpcClient::recv(VisionIpcBufExtra * extra, const int timeout_ms){
83+
VisionBuf * VisionIpcClient::recv(VisionIpcBufExtra * extra, const int timeout_ms) {
8484
auto p = poller->poll(timeout_ms);
8585

86-
if (!p.size()){
86+
if (!p.size()) {
8787
return nullptr;
8888
}
8989

9090
Message * r = sock->receive(true);
91-
if (r == nullptr){
91+
if (r == nullptr) {
9292
return nullptr;
9393
}
9494

@@ -105,7 +105,7 @@ VisionBuf * VisionIpcClient::recv(VisionIpcBufExtra * extra, const int timeout_m
105105

106106
VisionBuf * buf = &buffers[packet->idx];
107107

108-
if (buf->server_id != packet->server_id){
108+
if (buf->server_id != packet->server_id) {
109109
connected = false;
110110
delete r;
111111
return nullptr;
@@ -147,8 +147,8 @@ std::set<VisionStreamType> VisionIpcClient::getAvailableStreams(const std::strin
147147
return std::set<VisionStreamType>(available_streams, available_streams + r / sizeof(VisionStreamType));
148148
}
149149

150-
VisionIpcClient::~VisionIpcClient(){
151-
for (size_t i = 0; i < num_buffers; i++){
150+
VisionIpcClient::~VisionIpcClient() {
151+
for (size_t i = 0; i < num_buffers; i++) {
152152
if (buffers[i].free() != 0) {
153153
LOGE("Failed to free buffer %zu", i);
154154
}

0 commit comments

Comments
 (0)