[libcamera-devel,11/15] lc-compliance: Convert to pragma once
diff mbox series

Message ID 20211123224015.3619282-12-kieran.bingham@ideasonboard.com
State Accepted
Delegated to: Kieran Bingham
Headers show
Series
  • Use pragma once
Related show

Commit Message

Kieran Bingham Nov. 23, 2021, 10:40 p.m. UTC
Remove the verbose #ifndef/#define/#endif pattern for maintaining
header idempotency, and replace it with a simple #pragma once.

This simplifies the headers, and prevents redundant changes when
header files get moved.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/lc-compliance/environment.h    | 6 ++----
 src/lc-compliance/simple_capture.h | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/src/lc-compliance/environment.h b/src/lc-compliance/environment.h
index ba308732396e..0debbcce7150 100644
--- a/src/lc-compliance/environment.h
+++ b/src/lc-compliance/environment.h
@@ -4,8 +4,8 @@ 
  *
  * environment.h - Common environment for tests
  */
-#ifndef __LC_COMPLIANCE_ENVIRONMENT_H__
-#define __LC_COMPLIANCE_ENVIRONMENT_H__
+
+#pragma once
 
 #include <libcamera/libcamera.h>
 
@@ -25,5 +25,3 @@  private:
 	std::string cameraId_;
 	libcamera::CameraManager *cm_;
 };
-
-#endif /* __LC_COMPLIANCE_ENVIRONMENT_H__ */
diff --git a/src/lc-compliance/simple_capture.h b/src/lc-compliance/simple_capture.h
index 100ffd6637ad..9d31f7cb2e53 100644
--- a/src/lc-compliance/simple_capture.h
+++ b/src/lc-compliance/simple_capture.h
@@ -4,8 +4,8 @@ 
  *
  * simple_capture.h - Simple capture helper
  */
-#ifndef __LC_COMPLIANCE_SIMPLE_CAPTURE_H__
-#define __LC_COMPLIANCE_SIMPLE_CAPTURE_H__
+
+#pragma once
 
 #include <memory>
 
@@ -63,5 +63,3 @@  private:
 	unsigned int captureCount_;
 	unsigned int captureLimit_;
 };
-
-#endif /* __LC_COMPLIANCE_SIMPLE_CAPTURE_H__ */