فهرست منبع

libobs: Fix struct type usage before actual include

In its current form `struct dstr` is used in functions declarations
in the header file before the actual type is included (as `dstr.h` is
included after in `window-helpers.c`.

`clang-cl` is unable to compile this code because the function signature
 defined in the header will not match the implementation in the source 
 code due to the implicit forward-declaration of `struct dstr` before 
 the type is included in the actual header.
PatTheMav 2 سال پیش
والد
کامیت
e400d3f1bc
2فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 0 1
      libobs/util/windows/window-helpers.c
  2. 1 0
      libobs/util/windows/window-helpers.h

+ 0 - 1
libobs/util/windows/window-helpers.c

@@ -1,6 +1,5 @@
 #include "window-helpers.h"
 
-#include <util/dstr.h>
 #include <util/windows/obfuscate.h>
 
 #include <dwmapi.h>

+ 1 - 0
libobs/util/windows/window-helpers.h

@@ -2,6 +2,7 @@
 
 #include <obs-properties.h>
 #include <util/c99defs.h>
+#include <util/dstr.h>
 #include <Windows.h>
 
 #ifdef __cplusplus