Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Remove redundant base initialisers. #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/core/chatid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
/**
* @brief The default constructor. Creates an empty id.
*/
ChatId::ChatId()
: id()
{
}
ChatId::ChatId() {}
ChatId::~ChatId() = default;

/**
Expand Down
5 changes: 1 addition & 4 deletions src/core/groupid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
/**
* @brief The default constructor. Creates an empty Tox group ID.
*/
GroupId::GroupId()
: ChatId()
{
}
GroupId::GroupId() {}

/**
* @brief Constructs a GroupId from bytes.
Expand Down
5 changes: 1 addition & 4 deletions src/core/toxid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ const QRegularExpression
/**
* @brief The default constructor. Creates an empty Tox ID.
*/
ToxId::ToxId()
: toxId()
{
}
ToxId::ToxId() {}

/**
* @brief The copy constructor.
Expand Down
5 changes: 1 addition & 4 deletions src/core/toxpk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
/**
* @brief The default constructor. Creates an empty Tox key.
*/
ToxPk::ToxPk()
: ChatId()
{
}
ToxPk::ToxPk() {}

/**
* @brief Constructs a ToxPk from bytes.
Expand Down
4 changes: 0 additions & 4 deletions src/video/camerasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ CameraSource::CameraSource(Settings& settings_)
: deviceThread{new QThread}
, deviceName{"none"}
, device{nullptr}
, mode(VideoMode())
// clang-format off
, cctx{nullptr}
#if LIBAVCODEC_VERSION_INT < 3747941
, cctxOrig{nullptr}
Expand All @@ -106,8 +104,6 @@ CameraSource::CameraSource(Settings& settings_)
avdevice_register_all();
}

// clang-format on

/**
* @brief Setup default device
* @note If a device is already open, the source will seamlessly switch to the new device.
Expand Down
1 change: 0 additions & 1 deletion src/widget/contentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ ContentDialog::ContentDialog(const Core& core, Settings& settings_, Style& style
, splitter{new QSplitter(this)}
, friendLayout{new FriendListLayout(this)}
, activeChatroomWidget(nullptr)
, videoSurfaceSize(QSize())
, videoCount(0)
, settings{settings_}
, style{style_}
Expand Down
3 changes: 1 addition & 2 deletions src/widget/contentlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include <QStyleFactory>

ContentLayout::ContentLayout(Settings& settings_, Style& style_)
: QVBoxLayout()
, settings{settings_}
: settings{settings_}
, style{style_}
{
init();
Expand Down
3 changes: 1 addition & 2 deletions src/widget/form/filesform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ View::~View() = default;

FilesForm::FilesForm(CoreFile& coreFile, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager_, FriendList& friendList)
: QObject()
, messageBoxManager{messageBoxManager_}
: messageBoxManager{messageBoxManager_}
{
head = new QWidget();
QFont bold;
Expand Down
2 changes: 1 addition & 1 deletion src/widget/friendlistlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <cassert>

FriendListLayout::FriendListLayout()
: QVBoxLayout()

{
init();
}
Expand Down
3 changes: 1 addition & 2 deletions src/widget/tool/callconfirmwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
*/

CallConfirmWidget::CallConfirmWidget(Settings& settings, Style& style, const QWidget* anchor_)
: QWidget()
, anchor(anchor_)
: anchor(anchor_)
, rectW{120}
, rectH{85}
, spikeW{30}
Expand Down
3 changes: 1 addition & 2 deletions src/widget/tool/screenshotgrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#include "src/widget/widget.h"

ScreenshotGrabber::ScreenshotGrabber()
: QObject()
, mKeysBlocked(false)
: mKeysBlocked(false)
, scene(nullptr)
, mQToxVisible(true)
{
Expand Down
6 changes: 2 additions & 4 deletions test/chatlog/chatlinestorage_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class IdxChatLine : public ChatLine
{
public:
explicit IdxChatLine(ChatLogIdx idx_)
: ChatLine()
, idx(idx_)
: idx(idx_)
{
}

Expand All @@ -29,8 +28,7 @@ class TimestampChatLine : public ChatLine
{
public:
explicit TimestampChatLine(QDateTime dateTime)
: ChatLine()
, timestamp(dateTime)
: timestamp(dateTime)
{
}

Expand Down
Loading