Skip to content

Commit

Permalink
Merge branch 'modernize'
Browse files Browse the repository at this point in the history
* modernize:
  Pass by value and use std::move()
  Remove redundant void argument list in function definition
  Modernize trivial destructor
  • Loading branch information
luis-pereira committed Jan 12, 2022

Verified

This commit was signed with the committer’s verified signature.
stephancill Stephan Cilliers
2 parents b31a9a8 + 068acd1 commit 70f529a
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/devicewidget.cc
Original file line number Diff line number Diff line change
@@ -32,14 +32,15 @@
#include <QLabel>
#include <QMessageBox>
#include <QInputDialog>
#include <utility>

/*** DeviceWidget ***/
DeviceWidget::DeviceWidget(MainWindow* parent, QByteArray deviceType) :
MinimalStreamWidget(parent),
offsetButtonEnabled(false),
mpMainWindow(parent),
rename{new QAction{tr("Rename device..."), this}},
mDeviceType(deviceType) {
mDeviceType(std::move(deviceType)) {

setupUi(this);
advancedWidget->hide();
2 changes: 1 addition & 1 deletion src/pavucontrol.cc
Original file line number Diff line number Diff line change
@@ -593,7 +593,7 @@ void context_state_callback(pa_context *c, void *userdata) {
}
}

pa_context* get_context(void) {
pa_context* get_context() {
return context;
}

3 changes: 1 addition & 2 deletions src/sinkinputwidget.cc
Original file line number Diff line number Diff line change
@@ -39,8 +39,7 @@ SinkInputWidget::SinkInputWidget(MainWindow *parent) :
terminate->setText(tr("Terminate Playback"));
}

SinkInputWidget::~SinkInputWidget(void) {
}
SinkInputWidget::~SinkInputWidget(void) = default;

void SinkInputWidget::setSinkIndex(uint32_t idx) {
mSinkIndex = idx;
3 changes: 1 addition & 2 deletions src/sourceoutputwidget.cc
Original file line number Diff line number Diff line change
@@ -46,8 +46,7 @@ SourceOutputWidget::SourceOutputWidget(MainWindow *parent) :
}


SourceOutputWidget::~SourceOutputWidget(void) {
}
SourceOutputWidget::~SourceOutputWidget(void) = default;

void SourceOutputWidget::setSourceIndex(uint32_t idx) {
mSourceIndex = idx;

0 comments on commit 70f529a

Please sign in to comment.