diff --git a/AK/Bitmap.h b/AK/Bitmap.h index 8a7349100b0..841cf8049b8 100644 --- a/AK/Bitmap.h +++ b/AK/Bitmap.h @@ -37,7 +37,8 @@ namespace AK { class Bitmap { - AK_MAKE_NONCOPYABLE(Bitmap) + AK_MAKE_NONCOPYABLE(Bitmap); + public: // NOTE: A wrapping Bitmap won't try to free the wrapped data. static Bitmap wrap(u8* data, size_t size) diff --git a/AK/NeverDestroyed.h b/AK/NeverDestroyed.h index 1a106b9daa2..361f5190433 100644 --- a/AK/NeverDestroyed.h +++ b/AK/NeverDestroyed.h @@ -33,8 +33,9 @@ namespace AK { template class NeverDestroyed { - AK_MAKE_NONCOPYABLE(NeverDestroyed) - AK_MAKE_NONMOVABLE(NeverDestroyed) + AK_MAKE_NONCOPYABLE(NeverDestroyed); + AK_MAKE_NONMOVABLE(NeverDestroyed); + public: template NeverDestroyed(Args... args) diff --git a/AK/Noncopyable.h b/AK/Noncopyable.h index a68f42b7ca9..cf9b672da69 100644 --- a/AK/Noncopyable.h +++ b/AK/Noncopyable.h @@ -29,9 +29,9 @@ #define AK_MAKE_NONCOPYABLE(c) \ private: \ c(const c&) = delete; \ - c& operator=(const c&) = delete; + c& operator=(const c&) = delete #define AK_MAKE_NONMOVABLE(c) \ -private: \ - c(c&&) = delete; \ - c& operator=(c&&) = delete; +private: \ + c(c&&) = delete; \ + c& operator=(c&&) = delete diff --git a/AK/RefCounted.h b/AK/RefCounted.h index a9b90e0838b..d2b95915ae6 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -60,8 +60,9 @@ constexpr auto call_one_ref_left_if_present(...) -> FalseType } class RefCountedBase { - AK_MAKE_NONCOPYABLE(RefCountedBase) - AK_MAKE_NONMOVABLE(RefCountedBase) + AK_MAKE_NONCOPYABLE(RefCountedBase); + AK_MAKE_NONMOVABLE(RefCountedBase); + public: typedef unsigned int RefCountType; diff --git a/Applications/Piano/Track.h b/Applications/Piano/Track.h index 99f3e1f3abc..276e7e8bdbc 100644 --- a/Applications/Piano/Track.h +++ b/Applications/Piano/Track.h @@ -36,8 +36,9 @@ typedef AK::SinglyLinkedListIterator, RollNote> RollIter; class Track { - AK_MAKE_NONCOPYABLE(Track) - AK_MAKE_NONMOVABLE(Track) + AK_MAKE_NONCOPYABLE(Track); + AK_MAKE_NONMOVABLE(Track); + public: explicit Track(const u32& time); ~Track(); diff --git a/Applications/Piano/TrackManager.h b/Applications/Piano/TrackManager.h index a04daee6965..79331a55861 100644 --- a/Applications/Piano/TrackManager.h +++ b/Applications/Piano/TrackManager.h @@ -34,8 +34,9 @@ #include class TrackManager { - AK_MAKE_NONCOPYABLE(TrackManager) - AK_MAKE_NONMOVABLE(TrackManager) + AK_MAKE_NONCOPYABLE(TrackManager); + AK_MAKE_NONMOVABLE(TrackManager); + public: TrackManager(); ~TrackManager(); diff --git a/DevTools/HackStudio/Project.h b/DevTools/HackStudio/Project.h index 1063fee3c01..a7c90fd2b5b 100644 --- a/DevTools/HackStudio/Project.h +++ b/DevTools/HackStudio/Project.h @@ -42,8 +42,9 @@ enum class ProjectType { }; class Project { - AK_MAKE_NONCOPYABLE(Project) - AK_MAKE_NONMOVABLE(Project) + AK_MAKE_NONCOPYABLE(Project); + AK_MAKE_NONMOVABLE(Project); + public: ~Project(); diff --git a/DevTools/HackStudio/Tool.h b/DevTools/HackStudio/Tool.h index fd4674bcdca..63c9960a9d1 100644 --- a/DevTools/HackStudio/Tool.h +++ b/DevTools/HackStudio/Tool.h @@ -34,8 +34,9 @@ namespace HackStudio { class FormEditorWidget; class Tool { - AK_MAKE_NONCOPYABLE(Tool) - AK_MAKE_NONMOVABLE(Tool) + AK_MAKE_NONCOPYABLE(Tool); + AK_MAKE_NONMOVABLE(Tool); + public: virtual ~Tool() { } diff --git a/Games/Minesweeper/Field.h b/Games/Minesweeper/Field.h index 2b5d6888042..0ab7e0f300f 100644 --- a/Games/Minesweeper/Field.h +++ b/Games/Minesweeper/Field.h @@ -35,7 +35,8 @@ class SquareButton; class SquareLabel; class Square { - AK_MAKE_NONCOPYABLE(Square) + AK_MAKE_NONCOPYABLE(Square); + public: Square(); ~Square(); @@ -59,6 +60,7 @@ class Field final : public GUI::Frame { C_OBJECT(Field) friend class Square; friend class SquareLabel; + public: Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, Function on_size_changed); virtual ~Field() override; diff --git a/Libraries/LibC/stdlib.cpp b/Libraries/LibC/stdlib.cpp index 7c930a27226..04a02b0cb03 100644 --- a/Libraries/LibC/stdlib.cpp +++ b/Libraries/LibC/stdlib.cpp @@ -85,7 +85,7 @@ enum DigitConsumeDecision { template class NumParser { - AK_MAKE_NONMOVABLE(NumParser) + AK_MAKE_NONMOVABLE(NumParser); public: NumParser(Sign sign, int base) diff --git a/Libraries/LibCore/Object.h b/Libraries/LibCore/Object.h index 99d9238925f..e54e0d99202 100644 --- a/Libraries/LibCore/Object.h +++ b/Libraries/LibCore/Object.h @@ -62,8 +62,9 @@ class Object , public Weakable { // NOTE: No C_OBJECT macro for Core::Object itself. - AK_MAKE_NONCOPYABLE(Object) - AK_MAKE_NONMOVABLE(Object) + AK_MAKE_NONCOPYABLE(Object); + AK_MAKE_NONMOVABLE(Object); + public: IntrusiveListNode m_all_objects_list_node; diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h index c158cea6974..67ab5965b1f 100644 --- a/Libraries/LibGUI/Widget.h +++ b/Libraries/LibGUI/Widget.h @@ -68,8 +68,9 @@ enum class VerticalDirection { }; class WidgetClassRegistration { - AK_MAKE_NONCOPYABLE(WidgetClassRegistration) - AK_MAKE_NONMOVABLE(WidgetClassRegistration) + AK_MAKE_NONCOPYABLE(WidgetClassRegistration); + AK_MAKE_NONMOVABLE(WidgetClassRegistration); + public: WidgetClassRegistration(const String& class_name, Function()> factory); ~WidgetClassRegistration(); diff --git a/Libraries/LibGfx/Bitmap.h b/Libraries/LibGfx/Bitmap.h index cff596ef6c0..8979914d450 100644 --- a/Libraries/LibGfx/Bitmap.h +++ b/Libraries/LibGfx/Bitmap.h @@ -209,13 +209,15 @@ public: [[nodiscard]] bool set_nonvolatile(); private: - enum class Purgeable { No, - Yes }; + enum class Purgeable { + No, + Yes + }; Bitmap(BitmapFormat, const IntSize&, Purgeable); Bitmap(BitmapFormat, const IntSize&, size_t pitch, RGBA32*); Bitmap(BitmapFormat, NonnullRefPtr&&, const IntSize&, const Vector& palette); - void allocate_palette_from_format(BitmapFormat, const Vector& source_palette ); + void allocate_palette_from_format(BitmapFormat, const Vector& source_palette); IntSize m_size; RGBA32* m_data { nullptr }; diff --git a/Libraries/LibGfx/Palette.h b/Libraries/LibGfx/Palette.h index dc28a17f9db..87044e7e833 100644 --- a/Libraries/LibGfx/Palette.h +++ b/Libraries/LibGfx/Palette.h @@ -36,8 +36,9 @@ namespace Gfx { class PaletteImpl : public RefCounted { - AK_MAKE_NONCOPYABLE(PaletteImpl) - AK_MAKE_NONMOVABLE(PaletteImpl) + AK_MAKE_NONCOPYABLE(PaletteImpl); + AK_MAKE_NONMOVABLE(PaletteImpl); + public: ~PaletteImpl(); static NonnullRefPtr create_with_shared_buffer(SharedBuffer&); diff --git a/Libraries/LibJS/Runtime/Symbol.h b/Libraries/LibJS/Runtime/Symbol.h index ce90502774b..c5767938155 100644 --- a/Libraries/LibJS/Runtime/Symbol.h +++ b/Libraries/LibJS/Runtime/Symbol.h @@ -32,8 +32,8 @@ namespace JS { class Symbol final : public Cell { - AK_MAKE_NONCOPYABLE(Symbol) - AK_MAKE_NONMOVABLE(Symbol) + AK_MAKE_NONCOPYABLE(Symbol); + AK_MAKE_NONMOVABLE(Symbol); public: Symbol(String, bool);