Skip to content

Commit

Permalink
Adjust clang-format and apply it to st2110 files
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Szumski <tomasz.szumski@intel.com>
  • Loading branch information
tszumski committed Nov 21, 2024
1 parent c6c135a commit ed6d1ec
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 67 deletions.
6 changes: 5 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
ColumnLimit: 100
BreakBeforeBraces: Linux
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterNamespace: false
AfterFunction: true
AllowShortIfStatementsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
IndentCaseLabels: false
Expand Down
9 changes: 3 additions & 6 deletions media-proxy/include/mesh/st2110.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
#include "mesh_dp.h"
#include "logger.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

#define ST_APP_PAYLOAD_TYPE_ST30 (111)
#define ST_APP_PAYLOAD_TYPE_ST20 (112)
Expand All @@ -27,8 +25,7 @@ namespace connection
* Base abstract class of ST2110. ST2110Rx/ST2110Tx
* inherit this class.
*/
class ST2110 : public Connection
{
class ST2110 : public Connection {
public:
static st_frame_fmt mesh_video_format_to_st_format(int fmt);
static st30_fmt mesh_audio_format_to_st_format(int fmt);
Expand Down
18 changes: 6 additions & 12 deletions media-proxy/include/mesh/st2110rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@

#include "st2110.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

/**
* ST2110Rx
*
* Base abstract class of ST2110Rx. ST2110_20Rx/ST2110_22Rx/ST2110_30Rx
* inherit this class.
*/
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public ST2110
{
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public ST2110 {
public:
ST2110Rx()
{
Expand Down Expand Up @@ -105,8 +102,7 @@ template <typename FRAME, typename HANDLE, typename OPS> class ST2110Rx : public
}
};

class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops>
{
class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops> {
public:
ST2110_20Rx();
~ST2110_20Rx();
Expand All @@ -117,8 +113,7 @@ class ST2110_20Rx : public ST2110Rx<st_frame, st20p_rx_handle, st20p_rx_ops>
private:
};

class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops>
{
class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops> {
public:
ST2110_22Rx();
~ST2110_22Rx();
Expand All @@ -129,8 +124,7 @@ class ST2110_22Rx : public ST2110Rx<st_frame, st22p_rx_handle, st22p_rx_ops>
private:
};

class ST2110_30Rx : public ST2110Rx<st30_frame, st30p_rx_handle, st30p_rx_ops>
{
class ST2110_30Rx : public ST2110Rx<st30_frame, st30p_rx_handle, st30p_rx_ops> {
public:
ST2110_30Rx();
~ST2110_30Rx();
Expand Down
18 changes: 6 additions & 12 deletions media-proxy/include/mesh/st2110tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
#include "st2110.h"
#include <algorithm>

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

/**
* ST2110
*
* Base abstract class of ST2110. ST2110_20Tx/ST2110_22Tx/ST2110_30Tx
* inherit this class.
*/
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public ST2110
{
template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public ST2110 {
public:
ST2110Tx()
{
Expand Down Expand Up @@ -103,8 +100,7 @@ template <typename FRAME, typename HANDLE, typename OPS> class ST2110Tx : public
private:
};

class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops>
{
class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops> {
public:
ST2110_20Tx();
~ST2110_20Tx();
Expand All @@ -115,8 +111,7 @@ class ST2110_20Tx : public ST2110Tx<st_frame, st20p_tx_handle, st20p_tx_ops>
private:
};

class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops>
{
class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops> {
public:
ST2110_22Tx();
~ST2110_22Tx();
Expand All @@ -127,8 +122,7 @@ class ST2110_22Tx : public ST2110Tx<st_frame, st22p_tx_handle, st22p_tx_ops>
private:
};

class ST2110_30Tx : public ST2110Tx<st30_frame, st30p_tx_handle, st30p_tx_ops>
{
class ST2110_30Tx : public ST2110Tx<st30_frame, st30p_tx_handle, st30p_tx_ops> {
public:
ST2110_30Tx();
~ST2110_30Tx();
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

st_frame_fmt ST2110::mesh_video_format_to_st_format(int fmt)
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_20rx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110rx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_20Rx::ST2110_20Rx()
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_20tx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110tx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_20Tx::ST2110_20Tx()
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_22rx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110rx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_22Rx::ST2110_22Rx()
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_22tx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110tx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_22Tx::ST2110_22Tx()
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_30rx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110rx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_30Rx::ST2110_30Rx()
{
Expand Down
6 changes: 2 additions & 4 deletions media-proxy/src/mesh/st2110_30tx.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#include "st2110tx.h"

namespace mesh
{
namespace mesh {

namespace connection
{
namespace connection {

ST2110_30Tx::ST2110_30Tx()
{
Expand Down
12 changes: 4 additions & 8 deletions media-proxy/tests/st2110_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ struct wrapper {
uint32_t wrapper::received_packets_dummy1;
uint32_t wrapper::received_packets_dummy2;

class EmulatedTransmitter : public connection::Connection
{
class EmulatedTransmitter : public connection::Connection {
public:
EmulatedTransmitter(context::Context &ctx)
{
Expand All @@ -66,8 +65,7 @@ class EmulatedTransmitter : public connection::Connection
}
};

class EmulatedReceiver : public connection::Connection
{
class EmulatedReceiver : public connection::Connection {
public:
uint32_t received_packets_lossless;
uint32_t received_packets_lossy;
Expand Down Expand Up @@ -98,8 +96,7 @@ class EmulatedReceiver : public connection::Connection
}
};

class EmulatedST2110_Tx : public connection::ST2110Tx<st_frame, int *, int>
{
class EmulatedST2110_Tx : public connection::ST2110Tx<st_frame, int *, int> {
public:
EmulatedST2110_Tx()
{
Expand All @@ -118,8 +115,7 @@ class EmulatedST2110_Tx : public connection::ST2110Tx<st_frame, int *, int>
}
};

class EmulatedST2110_Rx : public connection::ST2110Rx<st_frame, int *, int>
{
class EmulatedST2110_Rx : public connection::ST2110Rx<st_frame, int *, int> {
public:
EmulatedST2110_Rx()
{
Expand Down

0 comments on commit ed6d1ec

Please sign in to comment.