mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix all warnings from the cppcoreguidelines-pro-type-member-init clang-tidy check (#4426)
This commit is contained in:
parent
877a4e05fa
commit
d4558b5fe5
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -84,6 +84,7 @@ Thumbs.db
|
|||
dependencies
|
||||
.cache
|
||||
.editorconfig
|
||||
vim.log
|
||||
|
||||
### CMake ###
|
||||
CMakeLists.txt.user
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
- Dev: Tests now run on Ubuntu 22.04 instead of 20.04 to loosen C++ restrictions in tests. (#4774)
|
||||
- Dev: Do a pretty major refactor of the Settings classes. List settings (e.g. highlights) are most heavily modified, and should have an extra eye kept on them. (#4775)
|
||||
- Dev: Remove `boost::noncopyable` use & `boost_random` dependency. (#4776)
|
||||
- Dev: Fix clang-tidy `cppcoreguidelines-pro-type-member-init` warnings. (#4426)
|
||||
|
||||
## 2.4.5
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ public:
|
|||
class Application : public IApplication
|
||||
{
|
||||
std::vector<std::unique_ptr<Singleton>> singletons_;
|
||||
int argc_;
|
||||
char **argv_;
|
||||
int argc_{};
|
||||
char **argv_{};
|
||||
|
||||
public:
|
||||
static Application *instance;
|
||||
|
|
|
@ -17,8 +17,8 @@ public:
|
|||
|
||||
private:
|
||||
QNetworkAccessManager *manager_;
|
||||
QNetworkReply *reply_;
|
||||
QFile *file_;
|
||||
QNetworkReply *reply_{};
|
||||
QFile *file_{};
|
||||
|
||||
private slots:
|
||||
void onDownloadProgress(qint64, qint64);
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace chatterino {
|
|||
struct Command {
|
||||
QString name;
|
||||
QString func;
|
||||
bool showInMsgContextMenu;
|
||||
bool showInMsgContextMenu{};
|
||||
|
||||
Command() = default;
|
||||
explicit Command(const QString &text);
|
||||
|
|
|
@ -209,7 +209,7 @@ private:
|
|||
Link link_;
|
||||
QString tooltip_;
|
||||
ImagePtr thumbnail_;
|
||||
ThumbnailType thumbnailType_;
|
||||
ThumbnailType thumbnailType_{};
|
||||
MessageElementFlags flags_;
|
||||
};
|
||||
|
||||
|
|
|
@ -90,10 +90,10 @@ struct MessageLayoutContainer {
|
|||
|
||||
private:
|
||||
struct Line {
|
||||
int startIndex;
|
||||
int endIndex;
|
||||
int startCharIndex;
|
||||
int endCharIndex;
|
||||
int startIndex{};
|
||||
int endIndex{};
|
||||
int startCharIndex{};
|
||||
int endCharIndex{};
|
||||
QRect rect;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ namespace {
|
|||
const rapidjson::Value &unparsedEmoji,
|
||||
QString shortCode = QString())
|
||||
{
|
||||
std::array<uint32_t, 9> unicodeBytes;
|
||||
std::array<uint32_t, 9> unicodeBytes{};
|
||||
|
||||
struct {
|
||||
bool apple;
|
||||
bool google;
|
||||
bool twitter;
|
||||
bool facebook;
|
||||
} capabilities;
|
||||
} capabilities{};
|
||||
|
||||
if (!shortCode.isEmpty())
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ struct CreateEmoteResult {
|
|||
Emote emote;
|
||||
EmoteId id;
|
||||
EmoteName name;
|
||||
bool hasImages;
|
||||
bool hasImages{};
|
||||
};
|
||||
|
||||
EmotePtr cachedOrMake(Emote &&emote, const EmoteId &id)
|
||||
|
|
|
@ -328,7 +328,7 @@ private:
|
|||
const QString subscriptionUrl_;
|
||||
const QString channelUrl_;
|
||||
const QString popoutPlayerUrl_;
|
||||
int chatterCount_;
|
||||
int chatterCount_{};
|
||||
UniqueAccess<StreamStatus> streamStatus_;
|
||||
UniqueAccess<RoomModes> roomModes_;
|
||||
std::atomic_flag loadingRecentMessages_ = ATOMIC_FLAG_INIT;
|
||||
|
@ -376,7 +376,7 @@ private:
|
|||
* The index of the twitch connection in
|
||||
* 7TV's user representation.
|
||||
*/
|
||||
size_t seventvUserTwitchConnectionIndex_;
|
||||
size_t seventvUserTwitchConnectionIndex_{};
|
||||
|
||||
/**
|
||||
* The next moment in time to signal activity in this channel to 7TV.
|
||||
|
|
|
@ -127,7 +127,7 @@ private:
|
|||
QString roomID_;
|
||||
bool hasBits_ = false;
|
||||
QString bits;
|
||||
int bitsLeft;
|
||||
int bitsLeft{};
|
||||
bool bitsStacked = false;
|
||||
bool historicalMessage_ = false;
|
||||
std::shared_ptr<MessageThread> thread_;
|
||||
|
|
|
@ -355,7 +355,7 @@ struct HelixVip {
|
|||
|
||||
struct HelixChatters {
|
||||
std::unordered_set<QString> chatters;
|
||||
int total;
|
||||
int total{};
|
||||
QString cursor;
|
||||
|
||||
HelixChatters() = default;
|
||||
|
|
|
@ -46,7 +46,7 @@ protected:
|
|||
private:
|
||||
struct {
|
||||
Split *split;
|
||||
} ui_;
|
||||
} ui_{};
|
||||
|
||||
struct Item {
|
||||
void *hwnd;
|
||||
|
@ -61,7 +61,7 @@ private:
|
|||
|
||||
void *target_;
|
||||
int yOffset_;
|
||||
int currentYOffset_;
|
||||
int currentYOffset_{};
|
||||
double x_ = -1;
|
||||
double pixelRatio_ = -1;
|
||||
int width_ = 360;
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
struct {
|
||||
QLabel *label;
|
||||
ColorButton *color;
|
||||
} selected;
|
||||
} selected{};
|
||||
|
||||
struct {
|
||||
QColorPicker *colorPicker;
|
||||
|
@ -82,7 +82,7 @@ private:
|
|||
|
||||
QLabel *htmlLabel;
|
||||
QLineEdit *htmlEdit;
|
||||
} picker;
|
||||
} picker{};
|
||||
} ui_;
|
||||
|
||||
enum SpinBox : size_t { RED = 0, GREEN = 1, BLUE = 2, ALPHA = 3, END };
|
||||
|
|
|
@ -25,7 +25,7 @@ private:
|
|||
QVBoxLayout *vbox;
|
||||
QComboBox *selector;
|
||||
QDialogButtonBox *buttonBox;
|
||||
} ui_;
|
||||
} ui_{};
|
||||
|
||||
QString channelURL_;
|
||||
};
|
||||
|
|
|
@ -39,8 +39,8 @@ private:
|
|||
void updateLatestMessages();
|
||||
|
||||
void loadAvatar(const QUrl &url);
|
||||
bool isMod_;
|
||||
bool isBroadcaster_;
|
||||
bool isMod_{};
|
||||
bool isBroadcaster_{};
|
||||
|
||||
Split *split_;
|
||||
|
||||
|
|
|
@ -256,8 +256,8 @@ private:
|
|||
void showReplyThreadPopup(const MessagePtr &message);
|
||||
bool canReplyToMessages() const;
|
||||
|
||||
QTimer *layoutCooldown_;
|
||||
bool layoutQueued_;
|
||||
QTimer *layoutCooldown_{};
|
||||
bool layoutQueued_{};
|
||||
|
||||
QTimer updateTimer_;
|
||||
bool updateQueued_ = false;
|
||||
|
@ -286,7 +286,7 @@ private:
|
|||
Split *split_ = nullptr;
|
||||
|
||||
Scrollbar *scrollBar_;
|
||||
EffectLabel *goToBottom_;
|
||||
EffectLabel *goToBottom_{};
|
||||
bool showScrollBar_ = false;
|
||||
|
||||
FilterSetPtr channelFilters_;
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
void updateSize();
|
||||
|
||||
QWidget *page;
|
||||
QWidget *page{};
|
||||
|
||||
void setCustomTitle(const QString &title);
|
||||
void resetCustomTitle();
|
||||
|
|
|
@ -35,9 +35,9 @@ public:
|
|||
private:
|
||||
std::shared_ptr<QColor> color_;
|
||||
Style style_;
|
||||
bool isRedeemedHighlight_;
|
||||
bool isFirstMessageHighlight_;
|
||||
bool isElevatedMessageHighlight_;
|
||||
bool isRedeemedHighlight_{};
|
||||
bool isFirstMessageHighlight_{};
|
||||
bool isElevatedMessageHighlight_{};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -27,7 +27,7 @@ protected:
|
|||
void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private:
|
||||
TitleBarButtonStyle style_;
|
||||
TitleBarButtonStyle style_{};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -16,7 +16,7 @@ private:
|
|||
void addLicense(QFormLayout *form, const QString &name_,
|
||||
const QString &website, const QString &licenseLink);
|
||||
|
||||
QLabel *logo_;
|
||||
QLabel *logo_{};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -14,9 +14,9 @@ public:
|
|||
AccountsPage();
|
||||
|
||||
private:
|
||||
QPushButton *addButton_;
|
||||
QPushButton *removeButton_;
|
||||
AccountSwitchWidget *accountSwitchWidget_;
|
||||
QPushButton *addButton_{};
|
||||
QPushButton *removeButton_{};
|
||||
AccountSwitchWidget *accountSwitchWidget_{};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
SettingsDialogTab *tab_;
|
||||
SettingsDialogTab *tab_{};
|
||||
pajlada::Signals::NoArgSignal onCancel_;
|
||||
pajlada::Signals::SignalHolder managedConnections_;
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ private:
|
|||
|
||||
struct {
|
||||
GenericListView *listView;
|
||||
} ui_;
|
||||
} ui_{};
|
||||
|
||||
GenericListModel model_;
|
||||
ActionCallback callback_;
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
|
||||
Type type_;
|
||||
Split *split_;
|
||||
Node *preferedFocusTarget_;
|
||||
Node *preferedFocusTarget_{};
|
||||
Node *parent_;
|
||||
QRectF geometry_;
|
||||
qreal flexH_ = 1;
|
||||
|
@ -158,7 +158,7 @@ private:
|
|||
{
|
||||
public:
|
||||
SplitContainer *parent;
|
||||
Node *node;
|
||||
Node *node{};
|
||||
|
||||
void setVertical(bool isVertical);
|
||||
ResizeHandle(SplitContainer *_parent = nullptr);
|
||||
|
@ -173,7 +173,7 @@ private:
|
|||
private:
|
||||
void resetFlex();
|
||||
|
||||
bool vertical_;
|
||||
bool vertical_{};
|
||||
bool isMouseDown_ = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ protected:
|
|||
QHBoxLayout *replyHbox;
|
||||
QLabel *replyLabel;
|
||||
EffectLabel *cancelReplyButton;
|
||||
} ui_;
|
||||
} ui_{};
|
||||
|
||||
std::shared_ptr<MessageThread> replyThread_ = nullptr;
|
||||
bool enableInlineReplying_;
|
||||
|
|
Loading…
Reference in a new issue