From ce72a4975b76c1f244221d7d11e6a4eebc98b99b Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 19 May 2018 20:23:53 +0100 Subject: Using pragma instead of gards The reason for this is that it reduces clashes between names. --- yage/core/camera.h | 5 +---- yage/core/core.h | 2 ++ yage/core/exception.h | 5 +---- yage/core/imageloader.h | 5 +---- yage/core/iomanager.h | 5 +---- yage/core/resourcemanager.h | 13 +------------ yage/core/texturecache.h | 5 +---- yage/core/window.h | 5 +---- 8 files changed, 9 insertions(+), 36 deletions(-) (limited to 'yage/core') diff --git a/yage/core/camera.h b/yage/core/camera.h index 63bf15ca..ec1a189d 100644 --- a/yage/core/camera.h +++ b/yage/core/camera.h @@ -6,8 +6,7 @@ * ---------------------------------------------------------------------------- */ -#ifndef YAGE_CORE_CAMERA_H -#define YAGE_CORE_CAMERA_H +#pragma once #include @@ -34,5 +33,3 @@ public: }; } // namespace yage - -#endif diff --git a/yage/core/core.h b/yage/core/core.h index 2d89955f..95da1f7f 100644 --- a/yage/core/core.h +++ b/yage/core/core.h @@ -6,6 +6,8 @@ * ---------------------------------------------------------------------------- */ +#pragma once + /** * Project namespace. * diff --git a/yage/core/exception.h b/yage/core/exception.h index 05733b39..843a58a1 100644 --- a/yage/core/exception.h +++ b/yage/core/exception.h @@ -1,5 +1,4 @@ -#ifndef YAGE_CORE_EXCEPTION_H -#define YAGE_CORE_EXCEPTION_H +#pragma once #include #include @@ -19,5 +18,3 @@ private: }; } // namespace yage - -#endif diff --git a/yage/core/imageloader.h b/yage/core/imageloader.h index bc041dc6..38980572 100644 --- a/yage/core/imageloader.h +++ b/yage/core/imageloader.h @@ -6,8 +6,7 @@ * ---------------------------------------------------------------------------- */ -#ifndef IMAGE_LOADER_H -#define IMAGE_LOADER_H +#pragma once #include @@ -23,5 +22,3 @@ public: }; } // namespace yage - -#endif diff --git a/yage/core/iomanager.h b/yage/core/iomanager.h index adf91ace..9a1bf12d 100644 --- a/yage/core/iomanager.h +++ b/yage/core/iomanager.h @@ -6,8 +6,7 @@ * ---------------------------------------------------------------------------- */ -#ifndef IO_MANAGER_H -#define IO_MANAGER_H +#pragma once #include #include @@ -24,5 +23,3 @@ extern bool readFileToBuffer(const std::string &file_path, } } // namespace yage - -#endif diff --git a/yage/core/resourcemanager.h b/yage/core/resourcemanager.h index 11a16f63..1f7d811c 100644 --- a/yage/core/resourcemanager.h +++ b/yage/core/resourcemanager.h @@ -6,16 +6,7 @@ * ---------------------------------------------------------------------------- */ -/** --------------------------------------------------------------------------- - * @file: resourcemanager.h - * - * Copyright (c) 2017 Yann Herklotz Grave - * MIT License, see LICENSE file for more details. - * ---------------------------------------------------------------------------- - */ - -#ifndef RESOURCE_MANAGER_H -#define RESOURCE_MANAGER_H +#pragma once #include "texturecache.h" @@ -37,5 +28,3 @@ public: }; } // namespace yage - -#endif diff --git a/yage/core/texturecache.h b/yage/core/texturecache.h index 8b34d39e..842ffec8 100644 --- a/yage/core/texturecache.h +++ b/yage/core/texturecache.h @@ -6,8 +6,7 @@ * ---------------------------------------------------------------------------- */ -#ifndef TEXTURE_CACHE_H -#define TEXTURE_CACHE_H +#pragma once #include "../data/texture.h" @@ -28,5 +27,3 @@ public: }; } // namespace yage - -#endif diff --git a/yage/core/window.h b/yage/core/window.h index 9980018d..6087fc8d 100644 --- a/yage/core/window.h +++ b/yage/core/window.h @@ -6,8 +6,7 @@ * ---------------------------------------------------------------------------- */ -#ifndef YAGE_CORE_WINDOW_H -#define YAGE_CORE_WINDOW_H +#pragma once #include @@ -60,5 +59,3 @@ public: }; } // namespace yage - -#endif -- cgit