浏览代码

Everywhere: Forward declare structs as structs

While structs being forward declared as classes is not strictly an
issue, Clang complains as this is not portable code, since some ABIs
treat classes declared as `class` and `struct` differently.

It's easier to fix these than to reason about explicitly disabling
another warning.
Daniel Bertalan 4 年之前
父节点
当前提交
b0208ce433

+ 1 - 1
Userland/DevTools/Profiler/TimelineHeader.h

@@ -11,7 +11,7 @@
 namespace Profiler {
 namespace Profiler {
 
 
 class Profile;
 class Profile;
-class Process;
+struct Process;
 
 
 class TimelineHeader final : public GUI::Frame {
 class TimelineHeader final : public GUI::Frame {
     C_OBJECT(TimelineHeader);
     C_OBJECT(TimelineHeader);

+ 1 - 1
Userland/DevTools/Profiler/TimelineTrack.h

@@ -11,7 +11,7 @@
 
 
 namespace Profiler {
 namespace Profiler {
 
 
-class Process;
+struct Process;
 class Profile;
 class Profile;
 class TimelineView;
 class TimelineView;
 
 

+ 1 - 1
Userland/Libraries/LibIPC/Stub.h

@@ -16,7 +16,7 @@ class BufferStream;
 namespace IPC {
 namespace IPC {
 
 
 class Message;
 class Message;
-class MessageBuffer;
+struct MessageBuffer;
 
 
 class Stub {
 class Stub {
 public:
 public:

+ 1 - 1
Userland/Libraries/LibWeb/Forward.h

@@ -60,7 +60,7 @@ namespace Web::HTML {
 class CanvasRenderingContext2D;
 class CanvasRenderingContext2D;
 class CloseEvent;
 class CloseEvent;
 class DOMParser;
 class DOMParser;
-class EventHandler;
+struct EventHandler;
 class HTMLAnchorElement;
 class HTMLAnchorElement;
 class HTMLAreaElement;
 class HTMLAreaElement;
 class HTMLAudioElement;
 class HTMLAudioElement;

+ 1 - 1
Userland/Services/WindowServer/Compositor.h

@@ -212,7 +212,7 @@ private:
             return iterate_flush_rects(m_flush_transparent_rects);
             return iterate_flush_rects(m_flush_transparent_rects);
         }
         }
     };
     };
-    friend class ScreenData;
+    friend struct ScreenData;
     Vector<ScreenData, default_screen_count> m_screen_data;
     Vector<ScreenData, default_screen_count> m_screen_data;
 
 
     IntrusiveList<Overlay, RawPtr<Overlay>, &Overlay::m_list_node> m_overlay_list;
     IntrusiveList<Overlay, RawPtr<Overlay>, &Overlay::m_list_node> m_overlay_list;