Skip to content

Commit

Permalink
Everywhere: Forward declare structs as structs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BertalanD authored and gunnarbeutner committed Jul 8, 2021
1 parent e32692e commit b0208ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Userland/DevTools/Profiler/TimelineHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Profiler {

class Profile;
class Process;
struct Process;

class TimelineHeader final : public GUI::Frame {
C_OBJECT(TimelineHeader);
Expand Down
2 changes: 1 addition & 1 deletion Userland/DevTools/Profiler/TimelineTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Profiler {

class Process;
struct Process;
class Profile;
class TimelineView;

Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibIPC/Stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BufferStream;
namespace IPC {

class Message;
class MessageBuffer;
struct MessageBuffer;

class Stub {
public:
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/Forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace Web::HTML {
class CanvasRenderingContext2D;
class CloseEvent;
class DOMParser;
class EventHandler;
struct EventHandler;
class HTMLAnchorElement;
class HTMLAreaElement;
class HTMLAudioElement;
Expand Down
2 changes: 1 addition & 1 deletion Userland/Services/WindowServer/Compositor.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Compositor final : public Core::Object {
return iterate_flush_rects(m_flush_transparent_rects);
}
};
friend class ScreenData;
friend struct ScreenData;
Vector<ScreenData, default_screen_count> m_screen_data;

IntrusiveList<Overlay, RawPtr<Overlay>, &Overlay::m_list_node> m_overlay_list;
Expand Down

0 comments on commit b0208ce

Please sign in to comment.