Skip to content

Commit 9f7ec33

Browse files
BenWiederhakeawesomekling
authored andcommitted
Meta: Force semi-colon after MAKE_AK_NONXXXABLE()
Before, we had about these occurrence counts: COPY: 13 without, 33 with MOVE: 12 without, 28 with Clearly, 'with' was the preferred way. However, this introduced double-semicolons all over the place, and caused some warnings to trigger. This patch *forces* the usage of a semi-colon when calling the macro, by removing the semi-colon within the macro. (And thus also gets rid of the double-semicolon.)
1 parent 6454969 commit 9f7ec33

File tree

15 files changed

+44
-30
lines changed

15 files changed

+44
-30
lines changed

AK/Bitmap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
namespace AK {
3838

3939
class Bitmap {
40-
AK_MAKE_NONCOPYABLE(Bitmap)
40+
AK_MAKE_NONCOPYABLE(Bitmap);
41+
4142
public:
4243
// NOTE: A wrapping Bitmap won't try to free the wrapped data.
4344
static Bitmap wrap(u8* data, size_t size)

AK/NeverDestroyed.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ namespace AK {
3333

3434
template<typename T>
3535
class NeverDestroyed {
36-
AK_MAKE_NONCOPYABLE(NeverDestroyed)
37-
AK_MAKE_NONMOVABLE(NeverDestroyed)
36+
AK_MAKE_NONCOPYABLE(NeverDestroyed);
37+
AK_MAKE_NONMOVABLE(NeverDestroyed);
38+
3839
public:
3940
template<typename... Args>
4041
NeverDestroyed(Args... args)

AK/Noncopyable.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
#define AK_MAKE_NONCOPYABLE(c) \
3030
private: \
3131
c(const c&) = delete; \
32-
c& operator=(const c&) = delete;
32+
c& operator=(const c&) = delete
3333

3434
#define AK_MAKE_NONMOVABLE(c) \
35-
private: \
36-
c(c&&) = delete; \
37-
c& operator=(c&&) = delete;
35+
private: \
36+
c(c&&) = delete; \
37+
c& operator=(c&&) = delete

AK/RefCounted.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ constexpr auto call_one_ref_left_if_present(...) -> FalseType
6060
}
6161

6262
class RefCountedBase {
63-
AK_MAKE_NONCOPYABLE(RefCountedBase)
64-
AK_MAKE_NONMOVABLE(RefCountedBase)
63+
AK_MAKE_NONCOPYABLE(RefCountedBase);
64+
AK_MAKE_NONMOVABLE(RefCountedBase);
65+
6566
public:
6667
typedef unsigned int RefCountType;
6768

Applications/Piano/Track.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
typedef AK::SinglyLinkedListIterator<SinglyLinkedList<RollNote>, RollNote> RollIter;
3737

3838
class Track {
39-
AK_MAKE_NONCOPYABLE(Track)
40-
AK_MAKE_NONMOVABLE(Track)
39+
AK_MAKE_NONCOPYABLE(Track);
40+
AK_MAKE_NONMOVABLE(Track);
41+
4142
public:
4243
explicit Track(const u32& time);
4344
~Track();

Applications/Piano/TrackManager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
#include <AK/Vector.h>
3535

3636
class TrackManager {
37-
AK_MAKE_NONCOPYABLE(TrackManager)
38-
AK_MAKE_NONMOVABLE(TrackManager)
37+
AK_MAKE_NONCOPYABLE(TrackManager);
38+
AK_MAKE_NONMOVABLE(TrackManager);
39+
3940
public:
4041
TrackManager();
4142
~TrackManager();

DevTools/HackStudio/Project.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ enum class ProjectType {
4242
};
4343

4444
class Project {
45-
AK_MAKE_NONCOPYABLE(Project)
46-
AK_MAKE_NONMOVABLE(Project)
45+
AK_MAKE_NONCOPYABLE(Project);
46+
AK_MAKE_NONMOVABLE(Project);
47+
4748
public:
4849
~Project();
4950

DevTools/HackStudio/Tool.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ namespace HackStudio {
3434
class FormEditorWidget;
3535

3636
class Tool {
37-
AK_MAKE_NONCOPYABLE(Tool)
38-
AK_MAKE_NONMOVABLE(Tool)
37+
AK_MAKE_NONCOPYABLE(Tool);
38+
AK_MAKE_NONMOVABLE(Tool);
39+
3940
public:
4041
virtual ~Tool() { }
4142

Games/Minesweeper/Field.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class SquareButton;
3535
class SquareLabel;
3636

3737
class Square {
38-
AK_MAKE_NONCOPYABLE(Square)
38+
AK_MAKE_NONCOPYABLE(Square);
39+
3940
public:
4041
Square();
4142
~Square();
@@ -59,6 +60,7 @@ class Field final : public GUI::Frame {
5960
C_OBJECT(Field)
6061
friend class Square;
6162
friend class SquareLabel;
63+
6264
public:
6365
Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, Function<void(Gfx::IntSize)> on_size_changed);
6466
virtual ~Field() override;

Libraries/LibC/stdlib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ enum DigitConsumeDecision {
8585

8686
template<typename T, T min_value, T max_value>
8787
class NumParser {
88-
AK_MAKE_NONMOVABLE(NumParser)
88+
AK_MAKE_NONMOVABLE(NumParser);
8989

9090
public:
9191
NumParser(Sign sign, int base)

0 commit comments

Comments
 (0)