Skip to content

Commit

Permalink
clang-format: adjust break after class style
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed Jun 16, 2024
1 parent 56a6422 commit dd5d988
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ IndentWidth: 4
UseTab: Always
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterEnum: false
AfterFunction: true
BreakBeforeBraces: Custom
Expand All @@ -19,3 +20,4 @@ SeparateDefinitionBlocks: Leave
MaxEmptyLinesToKeep: 2
PackConstructorInitializers: Never
BreakBeforeBinaryOperators: All

3 changes: 2 additions & 1 deletion source/AdapterIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#define TIMEOUT_QUANTA 100000


class RelativePositionIO : public BPositionIO {
class RelativePositionIO : public BPositionIO
{
public:
RelativePositionIO(BAdapterIO* owner, BPositionIO* buffer, bigtime_t timeout)
: BPositionIO(),
Expand Down
6 changes: 4 additions & 2 deletions source/AdapterIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class BAdapterIO;
class RelativePositionIO;


class BInputAdapter {
class BInputAdapter
{
public:
virtual ssize_t Write(const void* buffer, size_t size);

Expand All @@ -35,7 +36,8 @@ class BInputAdapter {
};


class BAdapterIO : public BMediaIO {
class BAdapterIO : public BMediaIO
{
public:
BAdapterIO(int32 flags, bigtime_t timeout);
virtual ~BAdapterIO();
Expand Down
3 changes: 2 additions & 1 deletion source/HttpUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
#include "override.h"


class DataLimit : public BUrlProtocolListener, public BDataIO {
class DataLimit : public BUrlProtocolListener, public BDataIO
{
public:
DataLimit(BDataIO* sink, size_t limit)
: fSink(sink),
Expand Down
3 changes: 2 additions & 1 deletion source/HttpUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
using namespace BPrivate::Network;


class HttpUtils {
class HttpUtils
{
public:
static status_t CheckPort(BUrl url, BUrl* newUrl, uint32 flags = 0);

Expand Down
3 changes: 2 additions & 1 deletion source/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
#define MSG_PARALLEL_PLAYBACK 'mPAR'


class MainWindow : public BWindow {
class MainWindow : public BWindow
{
public:
MainWindow();
virtual ~MainWindow();
Expand Down
3 changes: 2 additions & 1 deletion source/RadioApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#define kAppSignature "application/x-vnd.Fishpond-StreamRadio"


class RadioApp : BApplication {
class RadioApp : BApplication
{
public:
RadioApp();
~RadioApp();
Expand Down
6 changes: 4 additions & 2 deletions source/RadioSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#include "Station.h"


class StationsList : public BObjectList<Station> {
class StationsList : public BObjectList<Station>
{
public:
StationsList();
virtual ~StationsList();
Expand All @@ -39,7 +40,8 @@ class StationsList : public BObjectList<Station> {
void Save();
};

class RadioSettings : private BMessage {
class RadioSettings : private BMessage
{
public:
RadioSettings();
RadioSettings(const RadioSettings& orig);
Expand Down
3 changes: 2 additions & 1 deletion source/Station.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
class StreamPlayer;


class Station {
class Station
{
public:
Station(BString name, BString uri = B_EMPTY_STRING);
Station(const Station& orig);
Expand Down
12 changes: 8 additions & 4 deletions source/StationFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
typedef class StationFinderService* (*InstantiateFunc)();


class StationFinderServices {
class StationFinderServices
{
public:
StationFinderServices(){};
~StationFinderServices();
Expand All @@ -69,7 +70,8 @@ class StationFinderServices {
static std::vector<std::pair<char*, InstantiateFunc> > sServices;
};

class FindByCapability {
class FindByCapability
{
public:
FindByCapability(char* name);
FindByCapability(char* name, char* keyWords, char* delimiter);
Expand All @@ -86,7 +88,8 @@ class FindByCapability {
BStringList fKeywords;
};

class StationFinderService {
class StationFinderService
{
friend class StationFinderWindow;

public:
Expand Down Expand Up @@ -122,7 +125,8 @@ class StationFinderService {
FindByCapability* RegisterSearchCapability(char* name, char* keyWords, char* delimiter);
};

class StationFinderWindow : public BWindow {
class StationFinderWindow : public BWindow
{
public:
StationFinderWindow(BWindow* parent);
virtual ~StationFinderWindow();
Expand Down
3 changes: 2 additions & 1 deletion source/StationFinderListenLive.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "StationFinder.h"


class StationFinderListenLive : public StationFinderService {
class StationFinderListenLive : public StationFinderService
{
public:
StationFinderListenLive();
virtual ~StationFinderListenLive();
Expand Down
6 changes: 4 additions & 2 deletions source/StationFinderRadioNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include "StationFinder.h"


class IconLookup {
class IconLookup
{
public:
IconLookup(Station* station, BUrl iconUrl);

Expand All @@ -31,7 +32,8 @@ class IconLookup {
};


class StationFinderRadioNetwork : public StationFinderService {
class StationFinderRadioNetwork : public StationFinderService
{
public:
StationFinderRadioNetwork();
virtual ~StationFinderRadioNetwork();
Expand Down
6 changes: 4 additions & 2 deletions source/StationListView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
class StationListView;


class StationListViewItem : public BListItem {
class StationListViewItem : public BListItem
{
friend class StationListView;

public:
Expand Down Expand Up @@ -68,7 +69,8 @@ class StationListViewItem : public BListItem {
};


class StationListView : public BListView {
class StationListView : public BListView
{
public:
StationListView(bool canPlay = false);
virtual ~StationListView();
Expand Down
3 changes: 2 additions & 1 deletion source/StationPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
class MainWindow;


class StationPanel : public BView {
class StationPanel : public BView
{
public:
StationPanel(MainWindow* mainWindow, bool expanded = false);
virtual ~StationPanel();
Expand Down
6 changes: 4 additions & 2 deletions source/StreamIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class StreamIO;
typedef ssize_t (StreamIO::*DataFunc)(const char* data, size_t size, int next);


class DataFuncs {
class DataFuncs
{
public:
DataFuncs()
: fSize(10),
Expand Down Expand Up @@ -79,7 +80,8 @@ class DataFuncs {
};


class StreamIO : public BAdapterIO, BUrlProtocolListener {
class StreamIO : public BAdapterIO, BUrlProtocolListener
{
public:
StreamIO(Station* station, BLooper* metaListener = NULL);
~StreamIO();
Expand Down
3 changes: 2 additions & 1 deletion source/StreamPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
class Station;


class StreamPlayer : private BLocker {
class StreamPlayer : private BLocker
{
public:
StreamPlayer(Station* station, BLooper* notify = NULL);
virtual ~StreamPlayer();
Expand Down
3 changes: 2 additions & 1 deletion source/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#define RES_BN_WEB 11


class Utils {
class Utils
{
public:
Utils(){};
virtual ~Utils(){};
Expand Down

0 comments on commit dd5d988

Please sign in to comment.