Skip to content

Commit 924e59d

Browse files
committed
use #pragma instead of header guards
1 parent 2093d79 commit 924e59d

10 files changed

Lines changed: 10 additions & 40 deletions

right/src/hid/command_app.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __COMMAND_APP_HEADER__
2-
#define __COMMAND_APP_HEADER__
1+
#pragma once
32

43
extern "C" {
54
#include "device.h"
@@ -85,5 +84,3 @@ class command_app : public hid::application {
8584
double_buffer<report_in> in_buffer_{};
8685
double_buffer<report_out> out_buffer_{};
8786
};
88-
89-
#endif // __COMMAND_APP_HEADER__

right/src/hid/controls_app.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __CONTROLS_APP_HEADER__
2-
#define __CONTROLS_APP_HEADER__
1+
#pragma once
32

43
extern "C" {
54
#include "hid/controls_report.h"
@@ -91,5 +90,3 @@ class controls_app : public hid::application {
9190
};
9291

9392
using controls_buffer = controls_app::controls_report_base<0>;
94-
95-
#endif // __CONTROLS_APP_HEADER__

right/src/hid/controls_report.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __HID_CONTROLS_REPORT_H__
2-
#define __HID_CONTROLS_REPORT_H__
1+
#pragma once
32

43
#include "arduino_hid/SystemAPI.h"
54
#include "attributes.h"
@@ -29,5 +28,3 @@ bool ControlsReport_ContainsConsumerUsage(
2928
bool ControlsReport_ContainsSystemUsage(
3029
const hid_controls_report_t *report, uint8_t scancode);
3130
bool ControlsReport_HasChanges(const hid_controls_report_t buffer[2]);
32-
33-
#endif // __HID_CONTROLS_REPORT_H__

right/src/hid/double_buffer.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _DOUBLE_BUFFER_HPP_
2-
#define _DOUBLE_BUFFER_HPP_
1+
#pragma once
32

43
#include <array>
54
#include <atomic>
@@ -64,5 +63,3 @@ class double_buffer {
6463
std::array<aligned_storage, 2> buffers_{};
6564
std::atomic_uint8_t select_{};
6665
};
67-
68-
#endif // _DOUBLE_BUFFER_HPP_

right/src/hid/keyboard_app.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __KEYBOARD_APP_HEADER__
2-
#define __KEYBOARD_APP_HEADER__
1+
#pragma once
32

43
extern "C" {
54
#include "hid/keyboard_report.h"
@@ -192,5 +191,3 @@ class keyboard_app : public hid::application {
192191
};
193192
double_buffer<keys_reports> keys_{};
194193
};
195-
196-
#endif // __KEYBOARD_APP_HEADER__

right/src/hid/keyboard_report.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __HID_KEYBOARD_REPORT_H__
2-
#define __HID_KEYBOARD_REPORT_H__
1+
#pragma once
32

43
#include "attributes.h"
54
#include "lufa/HIDClassCommon.h"
@@ -73,5 +72,3 @@ bool KeyboardReport_FindFirstDifference(
7372
#define UsbBasicKeyboard_FindFirstDifference KeyboardReport_FindFirstDifference
7473

7574
bool KeyboardReport_HasChange(const hid_keyboard_report_t buffers[2]);
76-
77-
#endif // __HID_KEYBOARD_REPORT_H__

right/src/hid/mouse_app.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __MOUSE_APP_HEADER__
2-
#define __MOUSE_APP_HEADER__
1+
#pragma once
32

43
extern "C" {
54
#include "hid/mouse_report.h"
@@ -92,5 +91,3 @@ class mouse_app : public hid::application {
9291
};
9392

9493
using mouse_buffer = mouse_app::mouse_report_base<>;
95-
96-
#endif // __KEYBOARD_APP_HEADER__

right/src/hid/mouse_report.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __HID_MOUSE_REPORT_H__
2-
#define __HID_MOUSE_REPORT_H__
1+
#pragma once
32

43
#include "attributes.h"
54
#include <stddef.h>
@@ -21,5 +20,3 @@ float HorizontalScrollMultiplier(void);
2120

2221
void MouseReport_MergeReports(hid_mouse_report_t *sourceReport, hid_mouse_report_t *targetReport);
2322
bool MouseReport_HasChanges(const hid_mouse_report_t buffer[2], const hid_mouse_report_t *active);
24-
25-
#endif // __HID_MOUSE_REPORT_H__

right/src/hid/report_ids.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __REPORT_IDS__
2-
#define __REPORT_IDS__
1+
#pragma once
32

43
#include "device.h"
54

@@ -39,5 +38,3 @@ enum report_ids {
3938
IN_GAMEPAD = 6,
4039
#endif
4140
};
42-
43-
#endif // __REPORT_IDS__

right/src/hid/transport.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __HID_TRANSPORT_H__
2-
#define __HID_TRANSPORT_H__
1+
#pragma once
32

43
#include <string.h>
54
#include "hid/keyboard_report.h"
@@ -79,5 +78,3 @@ bool USB_IsMsHost(void);
7978
bool HOGP_Enable(void);
8079
void HOGP_Disable(void);
8180
int HOGP_HealthCheck(void);
82-
83-
#endif // __HID_TRANSPORT_H__

0 commit comments

Comments
 (0)