drm_hwcomposer: Use pragma once instead of include guards
Some of existing include guards were copy-pasted without modification,
therefore have incorrect name. Switch to 'pragma once' in order to fix
it and avoid such copy-paste issues in the future.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/drm/DrmConnector.h b/drm/DrmConnector.h
index 629b3cc..1e1a685 100644
--- a/drm/DrmConnector.h
+++ b/drm/DrmConnector.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_CONNECTOR_H_
-#define ANDROID_DRM_CONNECTOR_H_
+#pragma once
#include <xf86drmMode.h>
@@ -135,5 +134,3 @@
DrmProperty writeback_out_fence_;
};
} // namespace android
-
-#endif // ANDROID_DRM_PLANE_H_
diff --git a/drm/DrmCrtc.h b/drm/DrmCrtc.h
index ebf0a97..64fb56f 100644
--- a/drm/DrmCrtc.h
+++ b/drm/DrmCrtc.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_CRTC_H_
-#define ANDROID_DRM_CRTC_H_
+#pragma once
#include <xf86drmMode.h>
@@ -72,5 +71,3 @@
DrmProperty out_fence_ptr_property_;
};
} // namespace android
-
-#endif // ANDROID_DRM_CRTC_H_
diff --git a/drm/DrmDevice.h b/drm/DrmDevice.h
index 4cf0132..bb515e0 100644
--- a/drm/DrmDevice.h
+++ b/drm/DrmDevice.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_H_
-#define ANDROID_DRM_H_
+#pragma once
#include <cstdint>
#include <map>
@@ -24,7 +23,6 @@
#include "DrmConnector.h"
#include "DrmCrtc.h"
#include "DrmEncoder.h"
-#include "DrmFbImporter.h"
#include "utils/UniqueFd.h"
namespace android {
@@ -121,5 +119,3 @@
ResourceManager *const res_man_;
};
} // namespace android
-
-#endif // ANDROID_DRM_H_
diff --git a/drm/DrmDisplayPipeline.h b/drm/DrmDisplayPipeline.h
index 7ec619e..a3958e1 100644
--- a/drm/DrmDisplayPipeline.h
+++ b/drm/DrmDisplayPipeline.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRMDISPLAYPIPELINE_H_
-#define ANDROID_DRMDISPLAYPIPELINE_H_
+#pragma once
#include <memory>
#include <vector>
@@ -86,5 +85,3 @@
};
} // namespace android
-
-#endif
diff --git a/drm/DrmEncoder.h b/drm/DrmEncoder.h
index 39a695c..89e664c 100644
--- a/drm/DrmEncoder.h
+++ b/drm/DrmEncoder.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_ENCODER_H_
-#define ANDROID_DRM_ENCODER_H_
+#pragma once
#include <xf86drmMode.h>
@@ -65,5 +64,3 @@
const uint32_t index_in_res_array_;
};
} // namespace android
-
-#endif // ANDROID_DRM_ENCODER_H_
diff --git a/drm/DrmFbImporter.h b/drm/DrmFbImporter.h
index 9e94238..9a7c335 100644
--- a/drm/DrmFbImporter.h
+++ b/drm/DrmFbImporter.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef DRM_DRMFBIMPORTER_H_
-#define DRM_DRMFBIMPORTER_H_
+#pragma once
#include <drm/drm_fourcc.h>
#include <hardware/gralloc.h>
@@ -87,5 +86,3 @@
};
} // namespace android
-
-#endif
diff --git a/drm/DrmMode.h b/drm/DrmMode.h
index 20515f9..c6ddc63 100644
--- a/drm/DrmMode.h
+++ b/drm/DrmMode.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_MODE_H_
-#define ANDROID_DRM_MODE_H_
+#pragma once
#include <xf86drmMode.h>
@@ -80,5 +79,3 @@
std::string name_;
};
} // namespace android
-
-#endif // ANDROID_DRM_MODE_H_
diff --git a/drm/DrmPlane.h b/drm/DrmPlane.h
index 31f0a33..c26a3cc 100644
--- a/drm/DrmPlane.h
+++ b/drm/DrmPlane.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_PLANE_H_
-#define ANDROID_DRM_PLANE_H_
+#pragma once
#include <xf86drmMode.h>
@@ -100,5 +99,3 @@
std::map<LayerTransform, uint64_t> transform_enum_map_;
};
} // namespace android
-
-#endif // ANDROID_DRM_PLANE_H_
diff --git a/drm/DrmProperty.h b/drm/DrmProperty.h
index 26a7c38..5472c4e 100644
--- a/drm/DrmProperty.h
+++ b/drm/DrmProperty.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_DRM_PROPERTY_H_
-#define ANDROID_DRM_PROPERTY_H_
+#pragma once
#include <xf86drmMode.h>
@@ -104,5 +103,3 @@
}
} // namespace android
-
-#endif // ANDROID_DRM_PROPERTY_H_
diff --git a/drm/DrmUnique.h b/drm/DrmUnique.h
index 282528b..2be1eb9 100644
--- a/drm/DrmUnique.h
+++ b/drm/DrmUnique.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef DRM_UNIQUE_H_
-#define DRM_UNIQUE_H_
+#pragma once
#include <xf86drmMode.h>
@@ -83,5 +82,3 @@
return DrmModeResUnique(drmModeGetResources(fd),
[](drmModeRes *it) { drmModeFreeResources(it); });
}
-
-#endif
diff --git a/drm/ResourceManager.h b/drm/ResourceManager.h
index 144d00e..fb91627 100644
--- a/drm/ResourceManager.h
+++ b/drm/ResourceManager.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef RESOURCEMANAGER_H
-#define RESOURCEMANAGER_H
+#pragma once
#include <cstring>
@@ -79,5 +78,3 @@
bool initialized_{};
};
} // namespace android
-
-#endif // RESOURCEMANAGER_H
diff --git a/drm/UEventListener.h b/drm/UEventListener.h
index c8b8582..4fefdec 100644
--- a/drm/UEventListener.h
+++ b/drm/UEventListener.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_UEVENT_LISTENER_H_
-#define ANDROID_UEVENT_LISTENER_H_
+#pragma once
#include <functional>
@@ -44,5 +43,3 @@
std::function<void()> hotplug_handler_;
};
} // namespace android
-
-#endif
diff --git a/drm/VSyncWorker.h b/drm/VSyncWorker.h
index 1e6d39f..1774cc6 100644
--- a/drm/VSyncWorker.h
+++ b/drm/VSyncWorker.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef ANDROID_EVENT_WORKER_H_
-#define ANDROID_EVENT_WORKER_H_
+#pragma once
#include <hardware/hardware.h>
#include <hardware/hwcomposer.h>
@@ -55,5 +54,3 @@
int64_t last_timestamp_ = -1;
};
} // namespace android
-
-#endif