Skip to content

Commit

Permalink
clang-format: adjust constructor initializer style
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed May 13, 2024
1 parent 2e16772 commit 867edcf
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 16 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ BreakBeforeBraces: Custom
AllowShortEnumsOnASingleLine: false
SeparateDefinitionBlocks: Leave
MaxEmptyLinesToKeep: 2
PackConstructorInitializers: Never

12 changes: 10 additions & 2 deletions source/AdapterIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ class RelativePositionIO : public BPositionIO {


BAdapterIO::BAdapterIO(int32 flags, bigtime_t timeout)
: fFlags(flags), fBuffer(NULL), fTotalSize(0), fOpened(false), fSeekSem(-1), fInputAdapter(NULL)
: fFlags(flags),
fBuffer(NULL),
fTotalSize(0),
fOpened(false),
fSeekSem(-1),
fInputAdapter(NULL)
{
CALLED();

Expand Down Expand Up @@ -433,7 +438,10 @@ BAdapterIO::_EvaluateWait(off_t pos, off_t size)
}


BInputAdapter::BInputAdapter(BAdapterIO* io) : fIO(io) {}
BInputAdapter::BInputAdapter(BAdapterIO* io)
: fIO(io)
{
}


BInputAdapter::~BInputAdapter() {}
Expand Down
6 changes: 5 additions & 1 deletion source/HttpUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@

class DataLimit : public BUrlProtocolListener, public BDataIO {
public:
DataLimit(BDataIO* sink, size_t limit) : fSink(sink), fLimit(limit) {}
DataLimit(BDataIO* sink, size_t limit)
: fSink(sink),
fLimit(limit)
{
}

ssize_t Write(const void* buffer, size_t size) override
{
Expand Down
6 changes: 5 additions & 1 deletion source/RadioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
#define B_TRANSLATION_CONTEXT "RadioApp"


RadioApp::RadioApp() : BApplication(kAppSignature), fArgvMessage(NULL) {}
RadioApp::RadioApp()
: BApplication(kAppSignature),
fArgvMessage(NULL)
{
}


RadioApp::~RadioApp() {}
Expand Down
11 changes: 8 additions & 3 deletions source/RadioSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
const char* kSettingsFileName = "StreamRadio.settings";


StationsList::StationsList() : BObjectList<Station>() {}
StationsList::StationsList()
: BObjectList<Station>()
{
}


StationsList::~StationsList()
Expand Down Expand Up @@ -113,14 +116,16 @@ StationsList::Save()
}


RadioSettings::RadioSettings() : BMessage()
RadioSettings::RadioSettings()
: BMessage()
{
Stations = new StationsList();
_Load();
}


RadioSettings::RadioSettings(const RadioSettings& orig) : BMessage(orig)
RadioSettings::RadioSettings(const RadioSettings& orig)
: BMessage(orig)
{
Stations = new StationsList();
Stations->AddList(orig.Stations);
Expand Down
14 changes: 11 additions & 3 deletions source/StationFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@ StationFinderServices::Name(int i)
}


FindByCapability::FindByCapability(char* name) : fName(name), fKeywords() {}
FindByCapability::FindByCapability(char* name)
: fName(name),
fKeywords()
{
}


FindByCapability::FindByCapability(char* name, char* keyWords, char* delimiter)
: fName(name), fKeywords()
: fName(name),
fKeywords()
{
SetKeyWords(keyWords, delimiter);
}
Expand Down Expand Up @@ -106,7 +111,10 @@ FindByCapability::SetKeyWords(char* keyWords, char* delimiter)


StationFinderService::StationFinderService()
: serviceName("unknown"), serviceHomePage(""), serviceLogo(NULL), findByCapabilities(5, true)
: serviceName("unknown"),
serviceHomePage(""),
serviceLogo(NULL),
findByCapabilities(5, true)
{
}

Expand Down
10 changes: 8 additions & 2 deletions source/StationFinderRadioNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ const char* StationFinderRadioNetwork::kBaseUrl = "https://all.api.radio-browser
BString StationFinderRadioNetwork::sCachedServerUrl = B_EMPTY_STRING;


IconLookup::IconLookup(Station* station, BUrl iconUrl) : fStation(station), fIconUrl(iconUrl) {}
IconLookup::IconLookup(Station* station, BUrl iconUrl)
: fStation(station),
fIconUrl(iconUrl)
{
}


StationFinderRadioNetwork::StationFinderRadioNetwork()
: StationFinderService(), fIconLookupThread(-1), fIconLookupList(100, true)
: StationFinderService(),
fIconLookupThread(-1),
fIconLookupList(100, true)
{
serviceName.SetTo(B_TRANSLATE("Community Radio Browser"));
serviceHomePage.SetUrlString("https://www.radio-browser.info");
Expand Down
9 changes: 7 additions & 2 deletions source/StationListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@


StationListViewItem::StationListViewItem(Station* station)
: BListItem(0, true), fPlayer(NULL), fStation(station), fList(NULL)
: BListItem(0, true),
fPlayer(NULL),
fStation(station),
fList(NULL)
{
SetHeight(SLV_HEIGHT);
}
Expand Down Expand Up @@ -181,7 +184,9 @@ StationListViewItem::SetFillRatio(float fillRatio)


StationListView::StationListView(bool canPlay)
: BListView("Stations", B_SINGLE_SELECTION_LIST), fPlayMsg(NULL), fCanPlay(canPlay)
: BListView("Stations", B_SINGLE_SELECTION_LIST),
fPlayMsg(NULL),
fCanPlay(canPlay)
{
SetResizingMode(B_FOLLOW_ALL_SIDES);
SetExplicitMinSize(BSize(300, 2 * SLV_HEIGHT));
Expand Down
4 changes: 3 additions & 1 deletion source/StationPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@


StationPanel::StationPanel(MainWindow* mainWindow, bool expanded)
: BView("stationpanel", B_WILL_DRAW), fStationItem(NULL), fMainWindow(mainWindow)
: BView("stationpanel", B_WILL_DRAW),
fStationItem(NULL),
fMainWindow(mainWindow)
{
SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM);
SetExplicitAlignment(BAlignment(B_ALIGN_USE_FULL_WIDTH, B_ALIGN_VERTICAL_UNSET));
Expand Down
4 changes: 3 additions & 1 deletion source/StreamIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ typedef ssize_t (StreamIO::*DataFunc)(const char* data, size_t size, int next);

class DataFuncs {
public:
DataFuncs() : fSize(10), fLast(-1)
DataFuncs()
: fSize(10),
fLast(-1)
{
for (int i = 0; i < fSize; i++)
fFuncs[i] = NULL;
Expand Down

0 comments on commit 867edcf

Please sign in to comment.