Skip to content

Commit a7cc335

Browse files
committed
Adjust clang-format and apply it to st2110 files
Signed-off-by: Tomasz Szumski <tomasz.szumski@intel.com>
1 parent c6c135a commit a7cc335

File tree

12 files changed

+38
-107
lines changed

12 files changed

+38
-107
lines changed

.clang-format

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ BasedOnStyle: LLVM
33
IndentWidth: 4
44
UseTab: Never
55
ColumnLimit: 100
6-
BreakBeforeBraces: Linux
6+
BreakBeforeBraces: Custom
7+
BraceWrapping:
8+
AfterClass: false
9+
AfterNamespace: false
10+
AfterFunction: true
711
AllowShortIfStatementsOnASingleLine: false
812
AllowShortEnumsOnASingleLine: false
913
IndentCaseLabels: false

media-proxy/include/mesh/st2110.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
#include "mesh_dp.h"
1212
#include "logger.h"
1313

14-
namespace mesh
15-
{
16-
17-
namespace connection
18-
{
14+
namespace mesh::connection {
1915

2016
#define ST_APP_PAYLOAD_TYPE_ST30 (111)
2117
#define ST_APP_PAYLOAD_TYPE_ST20 (112)
@@ -27,8 +23,7 @@ namespace connection
2723
* Base abstract class of ST2110. ST2110Rx/ST2110Tx
2824
* inherit this class.
2925
*/
30-
class ST2110 : public Connection
31-
{
26+
class ST2110 : public Connection {
3227
public:
3328
static st_frame_fmt mesh_video_format_to_st_format(int fmt);
3429
static st30_fmt mesh_audio_format_to_st_format(int fmt);
@@ -56,8 +51,6 @@ class ST2110 : public Connection
5651
private:
5752
};
5853

59-
} // namespace connection
60-
61-
} // namespace mesh
54+
} // namespace mesh::connection
6255

6356
#endif // ST2110_H

media-proxy/include/mesh/st2110rx.h

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,15 @@
33

44
#include "st2110.h"
55

6-
namespace mesh
7-
{
8-
9-
namespace connection
10-
{
6+
namespace mesh::connection {
117

128
/**
139
* ST2110Rx
1410
*
1511
* Base abstract class of ST2110Rx. ST2110_20Rx/ST2110_22Rx/ST2110_30Rx
1612
* inherit this class.
1713
*/
18-
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public ST2110
19-
{
14+
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public ST2110 {
2015
public:
2116
ST2110Rx()
2217
{
@@ -105,8 +100,7 @@ template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public
105100
}
106101
};
107102

108-
class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops>
109-
{
103+
class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops> {
110104
public:
111105
ST2110_20Rx();
112106
~ST2110_20Rx();
@@ -117,8 +111,7 @@ class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops>
117111
private:
118112
};
119113

120-
class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops>
121-
{
114+
class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops> {
122115
public:
123116
ST2110_22Rx();
124117
~ST2110_22Rx();
@@ -129,8 +122,7 @@ class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops>
129122
private:
130123
};
131124

132-
class ST2110_30Rx : public ST2110Rx<st30_frame, st30p_rx_handle, st30p_rx_ops>
133-
{
125+
class ST2110_30Rx : public ST2110Rx<st30_frame, st30p_rx_handle, st30p_rx_ops> {
134126
public:
135127
ST2110_30Rx();
136128
~ST2110_30Rx();
@@ -141,8 +133,6 @@ class ST2110_30Rx : public ST2110Rx<st30_frame, st30p_rx_handle, st30p_rx_ops>
141133
private:
142134
};
143135

144-
} // namespace connection
145-
146-
} // namespace mesh
136+
} // namespace mesh::connection
147137

148138
#endif // ST2110RX_H

media-proxy/include/mesh/st2110tx.h

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@
44
#include "st2110.h"
55
#include <algorithm>
66

7-
namespace mesh
8-
{
9-
10-
namespace connection
11-
{
7+
namespace mesh::connection {
128

139
/**
1410
* ST2110
1511
*
1612
* Base abstract class of ST2110. ST2110_20Tx/ST2110_22Tx/ST2110_30Tx
1713
* inherit this class.
1814
*/
19-
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public ST2110
20-
{
15+
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public ST2110 {
2116
public:
2217
ST2110Tx()
2318
{
@@ -103,8 +98,7 @@ template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public
10398
private:
10499
};
105100

106-
class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops>
107-
{
101+
class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops> {
108102
public:
109103
ST2110_20Tx();
110104
~ST2110_20Tx();
@@ -115,8 +109,7 @@ class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops>
115109
private:
116110
};
117111

118-
class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops>
119-
{
112+
class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops> {
120113
public:
121114
ST2110_22Tx();
122115
~ST2110_22Tx();
@@ -127,8 +120,7 @@ class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops>
127120
private:
128121
};
129122

130-
class ST2110_30Tx : public ST2110Tx<st30_frame, st30p_tx_handle, st30p_tx_ops>
131-
{
123+
class ST2110_30Tx : public ST2110Tx<st30_frame, st30p_tx_handle, st30p_tx_ops> {
132124
public:
133125
ST2110_30Tx();
134126
~ST2110_30Tx();
@@ -139,8 +131,6 @@ class ST2110_30Tx : public ST2110Tx<st30_frame, st30p_tx_handle, st30p_tx_ops>
139131
private:
140132
};
141133

142-
} // namespace connection
143-
144-
} // namespace mesh
134+
} // namespace mesh::connection
145135

146136
#endif // ST2110TX_H

media-proxy/src/mesh/st2110.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
st_frame_fmt ST2110::mesh_video_format_to_st_format(int fmt)
106
{
@@ -154,6 +150,4 @@ mtl_handle ST2110::get_mtl_handle(const std::string &dev_port, mtl_log_level log
154150
return dev_handle;
155151
}
156152

157-
} // namespace connection
158-
159-
} // namespace mesh
153+
} // namespace mesh::connection

media-proxy/src/mesh/st2110_20rx.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110rx.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
ST2110_20Rx::ST2110_20Rx()
106
{
@@ -79,6 +75,4 @@ Result ST2110_20Rx::configure(context::Context &ctx, const std::string &dev_port
7975
return set_result(Result::success);
8076
}
8177

82-
} // namespace connection
83-
84-
} // namespace mesh
78+
} // namespace mesh::connection

media-proxy/src/mesh/st2110_20tx.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110tx.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
ST2110_20Tx::ST2110_20Tx()
106
{
@@ -76,6 +72,4 @@ Result ST2110_20Tx::configure(context::Context &ctx, const std::string &dev_port
7672
return set_result(Result::success);
7773
}
7874

79-
} // namespace connection
80-
81-
} // namespace mesh
75+
} // namespace mesh::connection

media-proxy/src/mesh/st2110_22rx.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110rx.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
ST2110_22Rx::ST2110_22Rx()
106
{
@@ -81,6 +77,4 @@ Result ST2110_22Rx::configure(context::Context &ctx, const std::string &dev_port
8177
return set_result(Result::success);
8278
}
8379

84-
} // namespace connection
85-
86-
} // namespace mesh
80+
} // namespace mesh::connection

media-proxy/src/mesh/st2110_22tx.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110tx.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
ST2110_22Tx::ST2110_22Tx()
106
{
@@ -79,6 +75,4 @@ Result ST2110_22Tx::configure(context::Context &ctx, const std::string &dev_port
7975
return set_result(Result::success);
8076
}
8177

82-
} // namespace connection
83-
84-
} // namespace mesh
78+
} // namespace mesh::connection

media-proxy/src/mesh/st2110_30rx.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "st2110rx.h"
22

3-
namespace mesh
4-
{
5-
6-
namespace connection
7-
{
3+
namespace mesh::connection {
84

95
ST2110_30Rx::ST2110_30Rx()
106
{
@@ -76,6 +72,4 @@ Result ST2110_30Rx::configure(context::Context &ctx, const std::string &dev_port
7672
return set_result(Result::success);
7773
}
7874

79-
} // namespace connection
80-
81-
} // namespace mesh
75+
} // namespace mesh::connection

0 commit comments

Comments
 (0)