diff --git a/.clang-format b/.clang-format index 664179c5f..e1e281067 100644 --- a/.clang-format +++ b/.clang-format @@ -9,7 +9,7 @@ AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: true AllowAllArgumentsOnNextLine: false -#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9 +AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false diff --git a/UI/auth-base.hpp b/UI/auth-base.hpp index a29d642c1..8d727f6cf 100644 --- a/UI/auth-base.hpp +++ b/UI/auth-base.hpp @@ -18,7 +18,8 @@ protected: std::string error; ErrorInfo(std::string message_, std::string error_) - : message(message_), error(error_) + : message(message_), + error(error_) { } }; diff --git a/UI/auth-oauth.cpp b/UI/auth-oauth.cpp index d18923d9d..bb2fd714c 100644 --- a/UI/auth-oauth.cpp +++ b/UI/auth-oauth.cpp @@ -27,7 +27,8 @@ extern QCefCookieManager *panel_cookies; /* ------------------------------------------------------------------------- */ OAuthLogin::OAuthLogin(QWidget *parent, const std::string &url, bool token) - : QDialog(parent), get_token(token) + : QDialog(parent), + get_token(token) { #ifdef BROWSER_AVAILABLE if (!cef) { diff --git a/UI/auth-youtube.cpp b/UI/auth-youtube.cpp index 7783fa62d..5bad0a09a 100644 --- a/UI/auth-youtube.cpp +++ b/UI/auth-youtube.cpp @@ -69,7 +69,8 @@ void RegisterYoutubeAuth() } YoutubeAuth::YoutubeAuth(const Def &d) - : OAuthStreamKey(d), section(SECTION_NAME) + : OAuthStreamKey(d), + section(SECTION_NAME) { } diff --git a/UI/context-bar-controls.cpp b/UI/context-bar-controls.cpp index 8c85d6f7a..cea7af627 100644 --- a/UI/context-bar-controls.cpp +++ b/UI/context-bar-controls.cpp @@ -92,7 +92,8 @@ void SourceToolbar::SetUndoProperties(obs_source_t *source, bool repeatable) /* ========================================================================= */ BrowserToolbar::BrowserToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_BrowserSourceToolbar) + : SourceToolbar(parent, source), + ui(new Ui_BrowserSourceToolbar) { ui->setupUi(this); } @@ -113,7 +114,8 @@ void BrowserToolbar::on_refresh_clicked() /* ========================================================================= */ ComboSelectToolbar::ComboSelectToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_DeviceSelectToolbar) + : SourceToolbar(parent, source), + ui(new Ui_DeviceSelectToolbar) { ui->setupUi(this); } @@ -384,7 +386,8 @@ void DeviceCaptureToolbar::on_activateButton_clicked() /* ========================================================================= */ GameCaptureToolbar::GameCaptureToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_GameCaptureToolbar) + : SourceToolbar(parent, source), + ui(new Ui_GameCaptureToolbar) { obs_property_t *p; int cur_idx; @@ -469,7 +472,8 @@ void GameCaptureToolbar::on_window_currentIndexChanged(int idx) /* ========================================================================= */ ImageSourceToolbar::ImageSourceToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_ImageSourceToolbar) + : SourceToolbar(parent, source), + ui(new Ui_ImageSourceToolbar) { ui->setupUi(this); @@ -529,7 +533,8 @@ static inline long long color_to_int(QColor color) } ColorSourceToolbar::ColorSourceToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_ColorSourceToolbar) + : SourceToolbar(parent, source), + ui(new Ui_ColorSourceToolbar) { ui->setupUi(this); @@ -598,7 +603,8 @@ void ColorSourceToolbar::on_choose_clicked() extern void MakeQFont(obs_data_t *font_obj, QFont &font, bool limit = false); TextSourceToolbar::TextSourceToolbar(QWidget *parent, OBSSource source) - : SourceToolbar(parent, source), ui(new Ui_TextSourceToolbar) + : SourceToolbar(parent, source), + ui(new Ui_TextSourceToolbar) { ui->setupUi(this); diff --git a/UI/frontend-plugins/decklink-captions/decklink-captions.cpp b/UI/frontend-plugins/decklink-captions/decklink-captions.cpp index c026fdbf1..afd274b21 100644 --- a/UI/frontend-plugins/decklink-captions/decklink-captions.cpp +++ b/UI/frontend-plugins/decklink-captions/decklink-captions.cpp @@ -23,7 +23,8 @@ obs_captions::obs_captions() {} static obs_captions *captions = nullptr; DecklinkCaptionsUI::DecklinkCaptionsUI(QWidget *parent) - : QDialog(parent), ui(new Ui_CaptionsDialog) + : QDialog(parent), + ui(new Ui_CaptionsDialog) { ui->setupUi(this); diff --git a/UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp b/UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp index 9539866c3..9a499db28 100644 --- a/UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp +++ b/UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp @@ -5,7 +5,8 @@ #include "decklink-ui-main.h" DecklinkOutputUI::DecklinkOutputUI(QWidget *parent) - : QDialog(parent), ui(new Ui_Output) + : QDialog(parent), + ui(new Ui_Output) { ui->setupUi(this); diff --git a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp index f5e56078a..ab5a74efc 100644 --- a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp +++ b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp @@ -26,7 +26,9 @@ struct SceneSwitch { regex re; inline SceneSwitch(OBSWeakSource scene_, const char *window_) - : scene(scene_), window(window_), re(window_) + : scene(scene_), + window(window_), + re(window_) { } }; @@ -79,7 +81,8 @@ static inline QString MakeSwitchName(const QString &scene, } SceneSwitcher::SceneSwitcher(QWidget *parent) - : QDialog(parent), ui(new Ui_SceneSwitcher) + : QDialog(parent), + ui(new Ui_SceneSwitcher) { ui->setupUi(this); diff --git a/UI/frontend-plugins/frontend-tools/captions.cpp b/UI/frontend-plugins/frontend-tools/captions.cpp index 30bf345dc..f8ae0d954 100644 --- a/UI/frontend-plugins/frontend-tools/captions.cpp +++ b/UI/frontend-plugins/frontend-tools/captions.cpp @@ -74,7 +74,8 @@ struct locale_info { inline locale_info() {} inline locale_info(const locale_info &) = delete; inline locale_info(locale_info &&li) - : name(std::move(li.name)), id(li.id) + : name(std::move(li.name)), + id(li.id) { } }; @@ -85,7 +86,8 @@ static bool valid_lang(LANGID id); /* ------------------------------------------------------------------------- */ CaptionsDialog::CaptionsDialog(QWidget *parent) - : QDialog(parent), ui(new Ui_CaptionsDialog) + : QDialog(parent), + ui(new Ui_CaptionsDialog) { ui->setupUi(this); diff --git a/UI/frontend-plugins/frontend-tools/output-timer.cpp b/UI/frontend-plugins/frontend-tools/output-timer.cpp index c0fba7ac0..df915bb40 100644 --- a/UI/frontend-plugins/frontend-tools/output-timer.cpp +++ b/UI/frontend-plugins/frontend-tools/output-timer.cpp @@ -13,7 +13,8 @@ using namespace std; OutputTimer *ot; OutputTimer::OutputTimer(QWidget *parent) - : QDialog(parent), ui(new Ui_OutputTimer) + : QDialog(parent), + ui(new Ui_OutputTimer) { ui->setupUi(this); diff --git a/UI/hotkey-edit.hpp b/UI/hotkey-edit.hpp index 518607e2d..6770f7d5e 100644 --- a/UI/hotkey-edit.hpp +++ b/UI/hotkey-edit.hpp @@ -60,7 +60,9 @@ class OBSHotkeyEdit : public QLineEdit { public: OBSHotkeyEdit(QWidget *parent, obs_key_combination_t original, OBSBasicSettings *settings) - : QLineEdit(parent), original(original), settings(settings) + : QLineEdit(parent), + original(original), + settings(settings) { #ifdef __APPLE__ // disable the input cursor on OSX, focus should be clear @@ -73,7 +75,9 @@ public: ResetKey(); } OBSHotkeyEdit(QWidget *parent = nullptr) - : QLineEdit(parent), original({}), settings(nullptr) + : QLineEdit(parent), + original({}), + settings(nullptr) { #ifdef __APPLE__ // disable the input cursor on OSX, focus should be clear diff --git a/UI/log-viewer.cpp b/UI/log-viewer.cpp index 8f894de4a..f02bcd1a5 100644 --- a/UI/log-viewer.cpp +++ b/UI/log-viewer.cpp @@ -13,7 +13,8 @@ #include "qt-wrappers.hpp" OBSLogViewer::OBSLogViewer(QWidget *parent) - : QDialog(parent), ui(new Ui::OBSLogViewer) + : QDialog(parent), + ui(new Ui::OBSLogViewer) { setWindowFlags(windowFlags() & Qt::WindowMaximizeButtonHint & ~Qt::WindowContextHelpButtonHint); diff --git a/UI/media-controls.cpp b/UI/media-controls.cpp index 63d1d2140..62063ece4 100644 --- a/UI/media-controls.cpp +++ b/UI/media-controls.cpp @@ -44,7 +44,8 @@ void MediaControls::OBSMediaPrevious(void *data, calldata_t *) } MediaControls::MediaControls(QWidget *parent) - : QWidget(parent), ui(new Ui::MediaControls) + : QWidget(parent), + ui(new Ui::MediaControls) { ui->setupUi(this); ui->playPauseButton->setProperty("themeID", "playIcon"); diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 46ab14da0..20f725f49 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1390,7 +1390,8 @@ std::vector OBSApp::GetBranches() } OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store) - : QApplication(argc, argv), profilerNameStore(store) + : QApplication(argc, argv), + profilerNameStore(store) { /* fix float handling */ #if defined(Q_OS_UNIX) diff --git a/UI/properties-view.hpp b/UI/properties-view.hpp index 52baefbe8..0d823f667 100644 --- a/UI/properties-view.hpp +++ b/UI/properties-view.hpp @@ -51,7 +51,9 @@ private: public: inline WidgetInfo(OBSPropertiesView *view_, obs_property_t *prop, QWidget *widget_) - : view(view_), property(prop), widget(widget_) + : view(view_), + property(prop), + widget(widget_) { } diff --git a/UI/source-tree.cpp b/UI/source-tree.cpp index 0ba15cb3b..8fb21918e 100644 --- a/UI/source-tree.cpp +++ b/UI/source-tree.cpp @@ -33,7 +33,8 @@ static inline OBSScene GetCurrentScene() /* ========================================================================= */ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) - : tree(tree_), sceneitem(sceneitem_) + : tree(tree_), + sceneitem(sceneitem_) { setAttribute(Qt::WA_TranslucentBackground); setMouseTracking(true); @@ -853,7 +854,8 @@ OBSSceneItem SourceTreeModel::Get(int idx) } SourceTreeModel::SourceTreeModel(SourceTree *st_) - : QAbstractListModel(st_), st(st_) + : QAbstractListModel(st_), + st(st_) { obs_frontend_add_event_callback(OBSFrontendEvent, this); } diff --git a/UI/update/win-update.hpp b/UI/update/win-update.hpp index a2b85bd7d..d345f204b 100644 --- a/UI/update/win-update.hpp +++ b/UI/update/win-update.hpp @@ -23,7 +23,8 @@ private slots: public: AutoUpdateThread(bool manualUpdate_, bool repairMode_ = false) - : manualUpdate(manualUpdate_), repairMode(repairMode_) + : manualUpdate(manualUpdate_), + repairMode(repairMode_) { } }; diff --git a/UI/volume-control.cpp b/UI/volume-control.cpp index a68ad2dc8..2bb7579ea 100644 --- a/UI/volume-control.cpp +++ b/UI/volume-control.cpp @@ -826,7 +826,9 @@ void VolumeMeter::wheelEvent(QWheelEvent *event) VolumeMeter::VolumeMeter(QWidget *parent, obs_volmeter_t *obs_volmeter, bool vertical) - : QWidget(parent), obs_volmeter(obs_volmeter), vertical(vertical) + : QWidget(parent), + obs_volmeter(obs_volmeter), + vertical(vertical) { setAttribute(Qt::WA_OpaquePaintEvent, true); diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp index 2d89d7347..44daae456 100644 --- a/UI/window-basic-auto-config-test.cpp +++ b/UI/window-basic-auto-config-test.cpp @@ -534,7 +534,10 @@ struct Result { int fps_den; inline Result(int cx_, int cy_, int fps_num_, int fps_den_) - : cx(cx_), cy(cy_), fps_num(fps_num_), fps_den(fps_den_) + : cx(cx_), + cy(cy_), + fps_num(fps_num_), + fps_den(fps_den_) { } }; @@ -1217,7 +1220,8 @@ void AutoConfigTestPage::Progress(int percentage) } AutoConfigTestPage::AutoConfigTestPage(QWidget *parent) - : QWizardPage(parent), ui(new Ui_AutoConfigTestPage) + : QWizardPage(parent), + ui(new Ui_AutoConfigTestPage) { ui->setupUi(this); setTitle(QTStr("Basic.AutoConfig.TestPage")); diff --git a/UI/window-basic-auto-config.cpp b/UI/window-basic-auto-config.cpp index d1fa868b6..5a183f049 100644 --- a/UI/window-basic-auto-config.cpp +++ b/UI/window-basic-auto-config.cpp @@ -67,7 +67,8 @@ static void GetServiceInfo(std::string &type, std::string &service, /* ------------------------------------------------------------------------- */ AutoConfigStartPage::AutoConfigStartPage(QWidget *parent) - : QWizardPage(parent), ui(new Ui_AutoConfigStartPage) + : QWizardPage(parent), + ui(new Ui_AutoConfigStartPage) { ui->setupUi(this); setTitle(QTStr("Basic.AutoConfig.StartPage")); @@ -120,7 +121,8 @@ void AutoConfigStartPage::PrioritizeVCam() #define FPS_PREFER_HIGH_RES RES_TEXT("FPS.PreferHighRes") AutoConfigVideoPage::AutoConfigVideoPage(QWidget *parent) - : QWizardPage(parent), ui(new Ui_AutoConfigVideoPage) + : QWizardPage(parent), + ui(new Ui_AutoConfigVideoPage) { ui->setupUi(this); @@ -250,7 +252,8 @@ enum class ListOpt : int { }; AutoConfigStreamPage::AutoConfigStreamPage(QWidget *parent) - : QWizardPage(parent), ui(new Ui_AutoConfigStreamPage) + : QWizardPage(parent), + ui(new Ui_AutoConfigStreamPage) { ui->setupUi(this); ui->bitrateLabel->setVisible(false); diff --git a/UI/window-basic-auto-config.hpp b/UI/window-basic-auto-config.hpp index eb50701ff..5d966c795 100644 --- a/UI/window-basic-auto-config.hpp +++ b/UI/window-basic-auto-config.hpp @@ -251,7 +251,8 @@ class AutoConfigTestPage : public QWizardPage { inline ServerInfo() {} inline ServerInfo(const char *name_, const char *address_) - : name(name_), address(address_) + : name(name_), + address(address_) { } }; diff --git a/UI/window-basic-filters.cpp b/UI/window-basic-filters.cpp index 7cb061525..58ee308fe 100644 --- a/UI/window-basic-filters.cpp +++ b/UI/window-basic-filters.cpp @@ -502,7 +502,8 @@ QMenu *OBSBasicFilters::CreateAddFilterPopupMenu(bool async) string name; inline FilterInfo(const char *type_, const char *name_) - : type(type_), name(name_) + : type(type_), + name(name_) { } diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 6bc9fd960..712f2e7d9 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -281,7 +281,9 @@ extern void RegisterYoutubeAuth(); #endif OBSBasic::OBSBasic(QWidget *parent) - : OBSMainWindow(parent), undo_s(ui), ui(new Ui::OBSBasic) + : OBSMainWindow(parent), + undo_s(ui), + ui(new Ui::OBSBasic) { setAttribute(Qt::WA_NativeWindow); @@ -5830,7 +5832,8 @@ QMenu *OBSBasic::AddBackgroundColorMenu(QMenu *menu, } ColorSelect::ColorSelect(QWidget *parent) - : QWidget(parent), ui(new Ui::ColorSelect) + : QWidget(parent), + ui(new Ui::ColorSelect) { ui->setupUi(this); } diff --git a/UI/window-basic-preview.cpp b/UI/window-basic-preview.cpp index 2f7fa9060..8ddb0f44b 100644 --- a/UI/window-basic-preview.cpp +++ b/UI/window-basic-preview.cpp @@ -77,7 +77,8 @@ struct SceneFindData { SceneFindData &operator=(SceneFindData &&) = delete; inline SceneFindData(const vec2 &pos_, bool selectBelow_) - : pos(pos_), selectBelow(selectBelow_) + : pos(pos_), + selectBelow(selectBelow_) { } }; @@ -93,7 +94,8 @@ struct SceneFindBoxData { SceneFindBoxData &operator=(SceneFindData &&) = delete; inline SceneFindBoxData(const vec2 &startPos_, const vec2 &pos_) - : startPos(startPos_), pos(pos_) + : startPos(startPos_), + pos(pos_) { } }; @@ -314,7 +316,8 @@ struct HandleFindData { HandleFindData &operator=(HandleFindData &&) = delete; inline HandleFindData(const vec2 &pos_, float scale) - : pos(pos_), radius(HANDLE_SEL_RADIUS / scale) + : pos(pos_), + radius(HANDLE_SEL_RADIUS / scale) { matrix4_identity(&parent_xform); } diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index 12753be7b..9a3caa502 100644 --- a/UI/window-basic-settings.cpp +++ b/UI/window-basic-settings.cpp @@ -97,7 +97,9 @@ struct FormatDesc { inline FormatDesc() = default; inline FormatDesc(const char *name, const char *mimeType, const ff_format_desc *desc = nullptr) - : name(name), mimeType(mimeType), desc(desc) + : name(name), + mimeType(mimeType), + desc(desc) { } diff --git a/UI/window-basic-transform.cpp b/UI/window-basic-transform.cpp index 01fa2c8dd..5d165a1c4 100644 --- a/UI/window-basic-transform.cpp +++ b/UI/window-basic-transform.cpp @@ -41,7 +41,9 @@ void OBSBasicTransform::HookWidget(QWidget *widget, const char *signal, #define DSCROLL_CHANGED SIGNAL(valueChanged(double)) OBSBasicTransform::OBSBasicTransform(OBSSceneItem item, OBSBasic *parent) - : QDialog(parent), ui(new Ui::OBSBasicTransform), main(parent) + : QDialog(parent), + ui(new Ui::OBSBasicTransform), + main(parent) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); diff --git a/UI/window-extra-browsers.cpp b/UI/window-extra-browsers.cpp index a53f66106..10d33876b 100644 --- a/UI/window-extra-browsers.cpp +++ b/UI/window-extra-browsers.cpp @@ -123,7 +123,8 @@ public: class EditWidget : public QLineEdit { public: inline EditWidget(QWidget *parent, QModelIndex index_) - : QLineEdit(parent), index(index_) + : QLineEdit(parent), + index(index_) { } @@ -420,7 +421,8 @@ bool ExtraBrowsersDelegate::UpdateText(QLineEdit *edit_) /* ------------------------------------------------------------------------- */ OBSExtraBrowsers::OBSExtraBrowsers(QWidget *parent) - : QDialog(parent), ui(new Ui::OBSExtraBrowsers) + : QDialog(parent), + ui(new Ui::OBSExtraBrowsers) { ui->setupUi(this); diff --git a/UI/window-extra-browsers.hpp b/UI/window-extra-browsers.hpp index 6b7558933..ca967ea10 100644 --- a/UI/window-extra-browsers.hpp +++ b/UI/window-extra-browsers.hpp @@ -76,7 +76,8 @@ class ExtraBrowsersDelegate : public QStyledItemDelegate { public: inline ExtraBrowsersDelegate(ExtraBrowsersModel *model_) - : QStyledItemDelegate(nullptr), model(model_) + : QStyledItemDelegate(nullptr), + model(model_) { } diff --git a/UI/window-log-reply.cpp b/UI/window-log-reply.cpp index fa4a18df5..0972bb228 100644 --- a/UI/window-log-reply.cpp +++ b/UI/window-log-reply.cpp @@ -23,7 +23,8 @@ #include "obs-app.hpp" OBSLogReply::OBSLogReply(QWidget *parent, const QString &url, const bool crash) - : QDialog(parent), ui(new Ui::OBSLogReply) + : QDialog(parent), + ui(new Ui::OBSLogReply) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); ui->setupUi(this); diff --git a/UI/window-missing-files.cpp b/UI/window-missing-files.cpp index f42dc07a6..014681ffa 100644 --- a/UI/window-missing-files.cpp +++ b/UI/window-missing-files.cpp @@ -43,7 +43,9 @@ enum MissingFilesRole { EntryStateRole = Qt::UserRole, NewPathsToProcessRole }; MissingFilesPathItemDelegate::MissingFilesPathItemDelegate( bool isOutput, const QString &defaultPath) - : QStyledItemDelegate(), isOutput(isOutput), defaultPath(defaultPath) + : QStyledItemDelegate(), + isOutput(isOutput), + defaultPath(defaultPath) { } diff --git a/UI/window-permissions.cpp b/UI/window-permissions.cpp index d292b6397..8fb8766ea 100644 --- a/UI/window-permissions.cpp +++ b/UI/window-permissions.cpp @@ -23,7 +23,8 @@ OBSPermissions::OBSPermissions(QWidget *parent, MacPermissionStatus capture, MacPermissionStatus video, MacPermissionStatus audio, MacPermissionStatus accessibility) - : QDialog(parent), ui(new Ui::OBSPermissions) + : QDialog(parent), + ui(new Ui::OBSPermissions) { ui->setupUi(this); SetStatus(ui->capturePermissionButton, capture, diff --git a/UI/window-projector.cpp b/UI/window-projector.cpp index f2ec7ca99..e94b6fb3b 100644 --- a/UI/window-projector.cpp +++ b/UI/window-projector.cpp @@ -16,7 +16,8 @@ static bool updatingMultiview = false, mouseSwitching, transitionOnDoubleClick; OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor, ProjectorType type_) - : OBSQTDisplay(widget, Qt::Window), weakSource(OBSGetWeakRef(source_)) + : OBSQTDisplay(widget, Qt::Window), + weakSource(OBSGetWeakRef(source_)) { OBSSource source = GetSource(); if (source) { diff --git a/UI/window-remux.cpp b/UI/window-remux.cpp index 003369882..02d56a734 100644 --- a/UI/window-remux.cpp +++ b/UI/window-remux.cpp @@ -56,7 +56,9 @@ enum RemuxEntryRole { EntryStateRole = Qt::UserRole, NewPathsToProcessRole }; RemuxEntryPathItemDelegate::RemuxEntryPathItemDelegate( bool isOutput, const QString &defaultPath) - : QStyledItemDelegate(), isOutput(isOutput), defaultPath(defaultPath) + : QStyledItemDelegate(), + isOutput(isOutput), + defaultPath(defaultPath) { } diff --git a/UI/window-remux.hpp b/UI/window-remux.hpp index 2f469b315..c9e7dcc41 100644 --- a/UI/window-remux.hpp +++ b/UI/window-remux.hpp @@ -96,7 +96,8 @@ class RemuxQueueModel : public QAbstractTableModel { public: RemuxQueueModel(QObject *parent = 0) - : QAbstractTableModel(parent), isProcessing(false) + : QAbstractTableModel(parent), + isProcessing(false) { } diff --git a/libobs-d3d11/d3d11-samplerstate.cpp b/libobs-d3d11/d3d11-samplerstate.cpp index e2feac76d..e854776bb 100644 --- a/libobs-d3d11/d3d11-samplerstate.cpp +++ b/libobs-d3d11/d3d11-samplerstate.cpp @@ -67,7 +67,8 @@ static inline D3D11_FILTER ConvertGSFilter(gs_sample_filter filter) gs_sampler_state::gs_sampler_state(gs_device_t *device, const gs_sampler_info *info) - : gs_obj(device, gs_type::gs_sampler_state), info(*info) + : gs_obj(device, gs_type::gs_sampler_state), + info(*info) { HRESULT hr; vec4 v4; diff --git a/libobs-d3d11/d3d11-subsystem.cpp b/libobs-d3d11/d3d11-subsystem.cpp index 59b6bb92b..31cd0f791 100644 --- a/libobs-d3d11/d3d11-subsystem.cpp +++ b/libobs-d3d11/d3d11-subsystem.cpp @@ -52,7 +52,8 @@ static inline void LogD3D11ErrorDetails(HRError error, gs_device_t *device) } gs_obj::gs_obj(gs_device_t *device_, gs_type type) - : device(device_), obj_type(type) + : device(device_), + obj_type(type) { prev_next = &device->first_obj; next = device->first_obj; diff --git a/libobs-d3d11/d3d11-subsystem.hpp b/libobs-d3d11/d3d11-subsystem.hpp index a216a2fd2..3bd407bdb 100644 --- a/libobs-d3d11/d3d11-subsystem.hpp +++ b/libobs-d3d11/d3d11-subsystem.hpp @@ -476,13 +476,16 @@ struct gs_texture : gs_obj { inline gs_texture(gs_texture_type type, uint32_t levels, gs_color_format format) - : type(type), levels(levels), format(format) + : type(type), + levels(levels), + format(format) { } inline gs_texture(gs_device *device, gs_type obj_type, gs_texture_type type) - : gs_obj(device, obj_type), type(type) + : gs_obj(device, obj_type), + type(type) { } @@ -632,7 +635,9 @@ struct gs_zstencil_buffer : gs_obj { } inline gs_zstencil_buffer() - : width(0), height(0), dxgiFormat(DXGI_FORMAT_UNKNOWN) + : width(0), + height(0), + dxgiFormat(DXGI_FORMAT_UNKNOWN) { } @@ -693,7 +698,8 @@ struct ShaderError { HRESULT hr; inline ShaderError(const ComPtr &errors, HRESULT hr) - : errors(errors), hr(hr) + : errors(errors), + hr(hr) { } }; @@ -717,7 +723,9 @@ struct gs_shader : gs_obj { inline gs_shader(gs_device_t *device, gs_type obj_type, gs_shader_type type) - : gs_obj(device, obj_type), type(type), constantSize(0) + : gs_obj(device, obj_type), + type(type), + constantSize(0) { } @@ -730,7 +738,8 @@ struct ShaderSampler { inline ShaderSampler(const char *name, gs_device_t *device, gs_sampler_info *info) - : name(name), sampler(device, info) + : name(name), + sampler(device, info) { } }; @@ -894,7 +903,8 @@ struct SavedBlendState : BlendState { inline void Release() { state.Release(); } inline SavedBlendState(const BlendState &val, D3D11_BLEND_DESC &desc) - : BlendState(val), bd(desc) + : BlendState(val), + bd(desc) { } }; @@ -906,7 +916,10 @@ struct StencilSide { gs_stencil_op_type zpass; inline StencilSide() - : test(GS_ALWAYS), fail(GS_KEEP), zfail(GS_KEEP), zpass(GS_KEEP) + : test(GS_ALWAYS), + fail(GS_KEEP), + zfail(GS_KEEP), + zpass(GS_KEEP) { } }; @@ -946,7 +959,8 @@ struct SavedZStencilState : ZStencilState { inline SavedZStencilState(const ZStencilState &val, D3D11_DEPTH_STENCIL_DESC desc) - : ZStencilState(val), dsd(desc) + : ZStencilState(val), + dsd(desc) { } }; @@ -973,7 +987,8 @@ struct SavedRasterState : RasterState { inline SavedRasterState(const RasterState &val, D3D11_RASTERIZER_DESC &desc) - : RasterState(val), rd(desc) + : RasterState(val), + rd(desc) { } }; diff --git a/libobs/util/profiler.hpp b/libobs/util/profiler.hpp index 31273985c..aa75a8e8d 100644 --- a/libobs/util/profiler.hpp +++ b/libobs/util/profiler.hpp @@ -12,7 +12,8 @@ struct ScopeProfiler { ScopeProfiler(const ScopeProfiler &) = delete; ScopeProfiler(ScopeProfiler &&other) - : name(other.name), enabled(other.enabled) + : name(other.name), + enabled(other.enabled) { other.enabled = false; } diff --git a/plugins/decklink/DecklinkInput.cpp b/plugins/decklink/DecklinkInput.cpp index db6a40761..7a28419b2 100644 --- a/plugins/decklink/DecklinkInput.cpp +++ b/plugins/decklink/DecklinkInput.cpp @@ -4,7 +4,8 @@ DeckLinkInput::DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery_) - : DecklinkBase(discovery_), source(source) + : DecklinkBase(discovery_), + source(source) { discovery->AddCallback(DeckLinkInput::DevicesChanged, this); } diff --git a/plugins/decklink/DecklinkOutput.cpp b/plugins/decklink/DecklinkOutput.cpp index 8398fd67f..c7e6523a0 100644 --- a/plugins/decklink/DecklinkOutput.cpp +++ b/plugins/decklink/DecklinkOutput.cpp @@ -4,7 +4,8 @@ DeckLinkOutput::DeckLinkOutput(obs_output_t *output, DeckLinkDeviceDiscovery *discovery_) - : DecklinkBase(discovery_), output(output) + : DecklinkBase(discovery_), + output(output) { discovery->AddCallback(DeckLinkOutput::DevicesChanged, this); } diff --git a/plugins/decklink/decklink-device-mode.cpp b/plugins/decklink/decklink-device-mode.cpp index 435b57b74..5ceeca5cc 100644 --- a/plugins/decklink/decklink-device-mode.cpp +++ b/plugins/decklink/decklink-device-mode.cpp @@ -1,7 +1,8 @@ #include "decklink-device-mode.hpp" DeckLinkDeviceMode::DeckLinkDeviceMode(IDeckLinkDisplayMode *mode, long long id) - : id(id), mode(mode) + : id(id), + mode(mode) { if (mode == nullptr) return; @@ -12,7 +13,9 @@ DeckLinkDeviceMode::DeckLinkDeviceMode(IDeckLinkDisplayMode *mode, long long id) } DeckLinkDeviceMode::DeckLinkDeviceMode(const std::string &name, long long id) - : id(id), mode(nullptr), name(name) + : id(id), + mode(nullptr), + name(name) { } diff --git a/plugins/obs-vst/EditorWidget.cpp b/plugins/obs-vst/EditorWidget.cpp index c30d3ffe4..5a0bfd04f 100644 --- a/plugins/obs-vst/EditorWidget.cpp +++ b/plugins/obs-vst/EditorWidget.cpp @@ -20,7 +20,8 @@ along with this program. If not, see . #include EditorWidget::EditorWidget(QWidget *parent, VSTPlugin *plugin) - : QWidget(parent), plugin(plugin) + : QWidget(parent), + plugin(plugin) { setWindowFlags(this->windowFlags() |= Qt::MSWindowsFixedSizeDialogHint); } diff --git a/plugins/obs-webrtc/whip-service.cpp b/plugins/obs-webrtc/whip-service.cpp index 70842ee3a..9a6d79e5b 100644 --- a/plugins/obs-webrtc/whip-service.cpp +++ b/plugins/obs-webrtc/whip-service.cpp @@ -4,7 +4,8 @@ const char *audio_codecs[MAX_CODECS] = {"opus"}; const char *video_codecs[MAX_CODECS] = {"h264"}; WHIPService::WHIPService(obs_data_t *settings, obs_service_t *) - : server(), bearer_token() + : server(), + bearer_token() { Update(settings); } diff --git a/plugins/win-dshow/win-dshow-encoder.cpp b/plugins/win-dshow/win-dshow-encoder.cpp index d3714ded0..937110f2a 100644 --- a/plugins/win-dshow/win-dshow-encoder.cpp +++ b/plugins/win-dshow/win-dshow-encoder.cpp @@ -22,7 +22,8 @@ struct DShowEncoder { DARRAY(uint8_t) header; inline DShowEncoder(obs_encoder_t *context_, const wchar_t *device_) - : context(context_), device(device_) + : context(context_), + device(device_) { da_init(firstPacket); da_init(header); diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 545d29219..ffce6e599 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -228,7 +228,8 @@ struct DShowInput { } inline DShowInput(obs_source_t *source_, obs_data_t *settings) - : source(source_), device(InitGraph::False) + : source(source_), + device(InitGraph::False) { memset(&audio, 0, sizeof(audio)); memset(&frame, 0, sizeof(frame));