From 8a1a14ba4c4a5f3e70a9b7ec21aa94ae1bc98e60 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 21 Jan 2024 21:49:59 -0500 Subject: [PATCH] Switch trailing files to #pragma once. --- OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj | 4 +++- OSBindings/Qt/audiobuffer.h | 5 +---- OSBindings/Qt/functionthread.h | 5 +---- OSBindings/Qt/keyboard.h | 5 +---- OSBindings/Qt/mainwindow.h | 5 +---- OSBindings/Qt/scantargetwidget.h | 5 +---- OSBindings/Qt/settings.h | 5 +---- OSBindings/Qt/timer.h | 5 +---- Reflection/TypeInfo.hpp | 6 +----- 9 files changed, 11 insertions(+), 34 deletions(-) diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index a3042258f..09dd756a7 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -1550,6 +1550,7 @@ 4B6AAEA8230E40250078E864 /* Target.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Target.cpp; sourceTree = ""; }; 4B6AAEA9230E40250078E864 /* SCSI.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SCSI.hpp; sourceTree = ""; }; 4B6AAEAA230E40250078E864 /* TargetImplementation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TargetImplementation.hpp; sourceTree = ""; }; + 4B6BBE682B5E0E5800E4C085 /* TypeInfo.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = TypeInfo.hpp; sourceTree = ""; }; 4B6ED2EE208E2F8A0047B343 /* WOZ.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WOZ.cpp; sourceTree = ""; }; 4B6ED2EF208E2F8A0047B343 /* WOZ.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = WOZ.hpp; sourceTree = ""; }; 4B6FD0342923061300EC4760 /* HDV.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HDV.cpp; sourceTree = ""; }; @@ -2959,10 +2960,11 @@ 4B3AF7CF2413470E00873C0B /* Reflection */ = { isa = PBXGroup; children = ( + 4B47F6C4241C87A100ED06F7 /* Struct.cpp */, 4BDA7F8129C4C223007A10A5 /* Dispatcher.hpp */, 4B3AF7D02413470E00873C0B /* Enum.hpp */, - 4B47F6C4241C87A100ED06F7 /* Struct.cpp */, 4B3AF7D12413472200873C0B /* Struct.hpp */, + 4B6BBE682B5E0E5800E4C085 /* TypeInfo.hpp */, ); name = Reflection; path = ../../Reflection; diff --git a/OSBindings/Qt/audiobuffer.h b/OSBindings/Qt/audiobuffer.h index b4beaaede..f8109b451 100644 --- a/OSBindings/Qt/audiobuffer.h +++ b/OSBindings/Qt/audiobuffer.h @@ -1,5 +1,4 @@ -#ifndef AUDIOSOURCE_H -#define AUDIOSOURCE_H +#pragma once #include #include @@ -93,5 +92,3 @@ struct AudioBuffer: public QIODevice { mutable size_t readPointer = 0; size_t writePointer = 0; }; - -#endif // AUDIOSOURCE_H diff --git a/OSBindings/Qt/functionthread.h b/OSBindings/Qt/functionthread.h index d9ce6191b..273301100 100644 --- a/OSBindings/Qt/functionthread.h +++ b/OSBindings/Qt/functionthread.h @@ -1,5 +1,4 @@ -#ifndef FUNCTIONTHREAD_H -#define FUNCTIONTHREAD_H +#pragma once #include #include @@ -87,5 +86,3 @@ class FunctionThread: public QThread { std::unique_ptr performer; std::atomic_flag performerFlag; }; - -#endif // FUNCTIONTHREAD_H diff --git a/OSBindings/Qt/keyboard.h b/OSBindings/Qt/keyboard.h index c0bd1b9b0..2b97c9c6d 100644 --- a/OSBindings/Qt/keyboard.h +++ b/OSBindings/Qt/keyboard.h @@ -1,5 +1,4 @@ -#ifndef KEYBOARD_H -#define KEYBOARD_H +#pragma once #include #include @@ -14,5 +13,3 @@ class KeyboardMapper { private: std::map keyByKeySym; }; - -#endif // MAINWINDOW_H diff --git a/OSBindings/Qt/mainwindow.h b/OSBindings/Qt/mainwindow.h index f2dd530fa..342554418 100644 --- a/OSBindings/Qt/mainwindow.h +++ b/OSBindings/Qt/mainwindow.h @@ -1,5 +1,4 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#pragma once #include @@ -172,5 +171,3 @@ class MainWindow : public QMainWindow, public Outputs::Speaker::Speaker::Delegat void addActivityObserver(); }; - -#endif // MAINWINDOW_H diff --git a/OSBindings/Qt/scantargetwidget.h b/OSBindings/Qt/scantargetwidget.h index 805692fd4..35ae20690 100644 --- a/OSBindings/Qt/scantargetwidget.h +++ b/OSBindings/Qt/scantargetwidget.h @@ -1,5 +1,4 @@ -#ifndef SCANTARGETWIDGET_H -#define SCANTARGETWIDGET_H +#pragma once #include @@ -72,5 +71,3 @@ class ScanTargetWidget : public QOpenGLWidget { private slots: void vsync(); }; - -#endif // SCANTARGETWIDGET_H diff --git a/OSBindings/Qt/settings.h b/OSBindings/Qt/settings.h index 234d8a8d9..9fd8d6d0a 100644 --- a/OSBindings/Qt/settings.h +++ b/OSBindings/Qt/settings.h @@ -1,5 +1,4 @@ -#ifndef SETTINGS_H -#define SETTINGS_H +#pragma once #include @@ -7,5 +6,3 @@ class Settings: public QSettings { public: Settings() : QSettings("thomasharte", "Clock Signal") {} }; - -#endif // SETTINGS_H diff --git a/OSBindings/Qt/timer.h b/OSBindings/Qt/timer.h index 959558a6a..690d13e70 100644 --- a/OSBindings/Qt/timer.h +++ b/OSBindings/Qt/timer.h @@ -1,5 +1,4 @@ -#ifndef TIMER_H -#define TIMER_H +#pragma once #include @@ -30,5 +29,3 @@ class Timer : public QObject FunctionThread thread; std::unique_ptr timer; }; - -#endif // TIMER_H diff --git a/Reflection/TypeInfo.hpp b/Reflection/TypeInfo.hpp index 926354642..51c9772e8 100644 --- a/Reflection/TypeInfo.hpp +++ b/Reflection/TypeInfo.hpp @@ -6,8 +6,7 @@ // Copyright © 2020 Thomas Harte. All rights reserved. // -#ifndef TypeInfo_hpp -#define TypeInfo_hpp +#pragma once #define ForAllInts(x) \ x(uint8_t); \ @@ -59,6 +58,3 @@ inline size_t size(const std::type_info *type) { } } - - -#endif /* TypeInfo_hpp */