Browse Source

UI: Use class member initializers for settings UI

Instead of using constructor initializer list, use class member
initialization
jp9000 10 years ago
parent
commit
3423d2f505
2 changed files with 9 additions and 16 deletions
  1. 1 8
      obs/window-basic-settings.cpp
  2. 8 8
      obs/window-basic-settings.hpp

+ 1 - 8
obs/window-basic-settings.cpp

@@ -124,14 +124,7 @@ void OBSBasicSettings::HookWidget(QWidget *widget, const char *signal,
 OBSBasicSettings::OBSBasicSettings(QWidget *parent)
 	: QDialog          (parent),
 	  main             (qobject_cast<OBSBasic*>(parent)),
-	  ui               (new Ui::OBSBasicSettings),
-	  generalChanged   (false),
-	  outputsChanged   (false),
-	  audioChanged     (false),
-	  videoChanged     (false),
-	  pageIndex        (0),
-	  loading          (true),
-	  streamProperties (nullptr)
+	  ui               (new Ui::OBSBasicSettings)
 {
 	string path;
 

+ 8 - 8
obs/window-basic-settings.hpp

@@ -37,14 +37,14 @@ private:
 	OBSBasic *main;
 
 	std::unique_ptr<Ui::OBSBasicSettings> ui;
-	bool generalChanged;
-	bool outputsChanged;
-	bool audioChanged;
-	bool videoChanged;
-	int  pageIndex;
-	bool loading;
-
-	OBSPropertiesView *streamProperties;
+	bool generalChanged = false;
+	bool outputsChanged = false;
+	bool audioChanged = false;
+	bool videoChanged = false;
+	int  pageIndex = 0;
+	bool loading = true;
+
+	OBSPropertiesView *streamProperties = nullptr;
 
 	void SaveCombo(QComboBox *widget, const char *section,
 			const char *value);