Browse Source

clang-format: Update source code files with clang-format 19.1.1

PatTheMav 7 months ago
parent
commit
96e4d67242

+ 2 - 3
frontend/settings/OBSHotkeyWidget.cpp

@@ -117,9 +117,8 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx)
 		return std::distance(begin(removeButtons), res);
 		return std::distance(begin(removeButtons), res);
 	};
 	};
 
 
-	QObject::connect(add, &QPushButton::clicked, [&, CurrentIndex] {
-		AddEdit({0, OBS_KEY_NONE}, CurrentIndex() + 1);
-	});
+	QObject::connect(add, &QPushButton::clicked,
+			 [&, CurrentIndex] { AddEdit({0, OBS_KEY_NONE}, CurrentIndex() + 1); });
 
 
 	QObject::connect(remove, &QPushButton::clicked, [&, CurrentIndex] { RemoveEdit(CurrentIndex()); });
 	QObject::connect(remove, &QPushButton::clicked, [&, CurrentIndex] { RemoveEdit(CurrentIndex()); });
 
 

+ 1 - 1
frontend/utility/BasicOutputHandler.hpp

@@ -65,7 +65,7 @@ struct BasicOutputHandler {
 
 
 	BasicOutputHandler(OBSBasic *main_);
 	BasicOutputHandler(OBSBasic *main_);
 
 
-	virtual ~BasicOutputHandler(){};
+	virtual ~BasicOutputHandler() {};
 
 
 	virtual std::shared_future<void> SetupStreaming(obs_service_t *service,
 	virtual std::shared_future<void> SetupStreaming(obs_service_t *service,
 							SetupStreamingContinuation_t continuation) = 0;
 							SetupStreamingContinuation_t continuation) = 0;

+ 1 - 1
frontend/utility/RemuxWorker.hpp

@@ -31,7 +31,7 @@ class RemuxWorker : public QObject {
 	void UpdateProgress(float percent);
 	void UpdateProgress(float percent);
 
 
 	explicit RemuxWorker() : isWorking(false) {}
 	explicit RemuxWorker() : isWorking(false) {}
-	virtual ~RemuxWorker(){};
+	virtual ~RemuxWorker() {};
 
 
 private slots:
 private slots:
 	void remux(const QString &source, const QString &target);
 	void remux(const QString &source, const QString &target);

+ 2 - 1
libobs/util/threading-windows.c

@@ -185,7 +185,8 @@ void os_set_thread_name(const char *name)
 		RaiseException(VC_EXCEPTION, 0, THREADNAME_INFO_SIZE, (ULONG_PTR *)&info);
 		RaiseException(VC_EXCEPTION, 0, THREADNAME_INFO_SIZE, (ULONG_PTR *)&info);
 #ifdef NO_SEH_MINGW
 #ifdef NO_SEH_MINGW
 	}
 	}
-	__except1{
+	__except1
+	{
 #else
 #else
 	} __except (EXCEPTION_EXECUTE_HANDLER) {
 	} __except (EXCEPTION_EXECUTE_HANDLER) {
 #endif
 #endif

+ 1 - 1
plugins/coreaudio-encoder/encoder.cpp

@@ -1263,7 +1263,7 @@ bool obs_module_load(void)
 	CA_LOG(LOG_INFO, "Adding CoreAudio AAC encoder");
 	CA_LOG(LOG_INFO, "Adding CoreAudio AAC encoder");
 #endif
 #endif
 
 
-	struct obs_encoder_info aac_info {};
+	struct obs_encoder_info aac_info{};
 	aac_info.id = "CoreAudio_AAC";
 	aac_info.id = "CoreAudio_AAC";
 	aac_info.type = OBS_ENCODER_AUDIO;
 	aac_info.type = OBS_ENCODER_AUDIO;
 	aac_info.codec = "aac";
 	aac_info.codec = "aac";

+ 4 - 4
plugins/mac-capture/mac-display-capture.m

@@ -600,10 +600,10 @@ static obs_properties_t *display_capture_properties(void *unused)
                                                      BOOL *_Nonnull stop __unused) {
                                                      BOOL *_Nonnull stop __unused) {
         char dimension_buffer[4][12];
         char dimension_buffer[4][12];
         char name_buffer[256];
         char name_buffer[256];
-        snprintf(dimension_buffer[0], sizeof(dimension_buffer[0]), "%u", (uint32_t)[screen frame].size.width);
-        snprintf(dimension_buffer[1], sizeof(dimension_buffer[0]), "%u", (uint32_t)[screen frame].size.height);
-        snprintf(dimension_buffer[2], sizeof(dimension_buffer[0]), "%d", (int32_t)[screen frame].origin.x);
-        snprintf(dimension_buffer[3], sizeof(dimension_buffer[0]), "%d", (int32_t)[screen frame].origin.y);
+        snprintf(dimension_buffer[0], sizeof(dimension_buffer[0]), "%u", (uint32_t) [screen frame].size.width);
+        snprintf(dimension_buffer[1], sizeof(dimension_buffer[0]), "%u", (uint32_t) [screen frame].size.height);
+        snprintf(dimension_buffer[2], sizeof(dimension_buffer[0]), "%d", (int32_t) [screen frame].origin.x);
+        snprintf(dimension_buffer[3], sizeof(dimension_buffer[0]), "%d", (int32_t) [screen frame].origin.y);
 
 
         snprintf(name_buffer, sizeof(name_buffer), "%.200s: %.12sx%.12s @ %.12s,%.12s",
         snprintf(name_buffer, sizeof(name_buffer), "%.200s: %.12sx%.12s @ %.12s,%.12s",
                  [[screen localizedName] UTF8String], dimension_buffer[0], dimension_buffer[1], dimension_buffer[2],
                  [[screen localizedName] UTF8String], dimension_buffer[0], dimension_buffer[1], dimension_buffer[2],

+ 1 - 1
plugins/nv-filters/nvidia-videofx-filter.c

@@ -243,7 +243,7 @@ static bool nvvfx_filter_create_internal(struct nvvfx_data *filter)
 	}
 	}
 	if (NVCV_SUCCESS != vfxErr)
 	if (NVCV_SUCCESS != vfxErr)
 		log_nverror_destroy(filter, vfxErr);
 		log_nverror_destroy(filter, vfxErr);
-		/* debug */
+	/* debug */
 #ifdef _DEBUG
 #ifdef _DEBUG
 	const char *info;
 	const char *info;
 	vfxErr = NvVFX_GetString(filter->handle_blur, NVVFX_INFO, &info);
 	vfxErr = NvVFX_GetString(filter->handle_blur, NVVFX_INFO, &info);

+ 1 - 1
plugins/nv-filters/nvvfx-load.h

@@ -252,7 +252,7 @@ typedef struct
 #ifdef _MSC_VER
 #ifdef _MSC_VER
 	__declspec(dllexport)
 	__declspec(dllexport)
 #endif // _MSC_VER
 #endif // _MSC_VER
-		NvCVImage {
+	NvCVImage {
 	unsigned int width;                    //!< The number of pixels horizontally in the image.
 	unsigned int width;                    //!< The number of pixels horizontally in the image.
 	unsigned int height;                   //!< The number of pixels  vertically  in the image.
 	unsigned int height;                   //!< The number of pixels  vertically  in the image.
 	signed int pitch;                      //!< The byte stride between pixels vertically.
 	signed int pitch;                      //!< The byte stride between pixels vertically.

+ 1 - 1
plugins/obs-webrtc/whip-output.cpp

@@ -682,7 +682,7 @@ void register_whip_output()
 		return obs_properties_create();
 		return obs_properties_create();
 	};
 	};
 	info.get_total_bytes = [](void *priv_data) -> uint64_t {
 	info.get_total_bytes = [](void *priv_data) -> uint64_t {
-		return (uint64_t) static_cast<WHIPOutput *>(priv_data)->GetTotalBytes();
+		return (uint64_t)static_cast<WHIPOutput *>(priv_data)->GetTotalBytes();
 	};
 	};
 	info.get_connect_time_ms = [](void *priv_data) -> int {
 	info.get_connect_time_ms = [](void *priv_data) -> int {
 		return static_cast<WHIPOutput *>(priv_data)->GetConnectTime();
 		return static_cast<WHIPOutput *>(priv_data)->GetConnectTime();

+ 1 - 1
shared/obs-scripting/obs-scripting-python.c

@@ -1599,7 +1599,7 @@ bool obs_scripting_load_python(const char *python_path)
 	if (python_loaded)
 	if (python_loaded)
 		return true;
 		return true;
 
 
-		/* Use external python on windows and mac */
+	/* Use external python on windows and mac */
 #if RUNTIME_LINK
 #if RUNTIME_LINK
 	if (!import_python(python_path, &python_version))
 	if (!import_python(python_path, &python_version))
 		return false;
 		return false;

+ 1 - 1
shared/obs-scripting/obs-scripting.c

@@ -161,7 +161,7 @@ void obs_scripting_unload(void)
 	if (!scripting_loaded)
 	if (!scripting_loaded)
 		return;
 		return;
 
 
-		/* ---------------------- */
+	/* ---------------------- */
 
 
 #if defined(LUAJIT_FOUND)
 #if defined(LUAJIT_FOUND)
 	obs_lua_unload();
 	obs_lua_unload();