From 054966f3c53e45076a4232fab0ad1ba4d939d8c0 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 2 Feb 2016 21:18:54 +0100 Subject: [PATCH] [DEV] replace 'include guard' with 'pragma once' --- egami/Image.h | 7 ++----- egami/ImageMono.h | 8 ++------ egami/ImagePrivate.h | 5 +---- egami/debug.h | 6 +----- egami/egami.h | 10 +++------- egami/wrapperBMP.h | 10 +++------- egami/wrapperEDF.h | 8 ++------ egami/wrapperPNG.h | 11 +++-------- egami/wrapperSVG.h | 10 +++------- 9 files changed, 20 insertions(+), 55 deletions(-) diff --git a/egami/Image.h b/egami/Image.h index a4ed8e2..f74a6c0 100644 --- a/egami/Image.h +++ b/egami/Image.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_IMAGE_H__ -#define __EGAMI_IMAGE_H__ +#pragma once #include #include @@ -88,7 +86,6 @@ namespace egami { void set(const std::vector>& _data, const ivec2& _size); void set(const std::vector>& _data, const ivec2& _size); }; -}; +} -#endif diff --git a/egami/ImageMono.h b/egami/ImageMono.h index 7336e06..1eecb30 100644 --- a/egami/ImageMono.h +++ b/egami/ImageMono.h @@ -6,8 +6,7 @@ * @license APACHE v2.0 (see license file) */ -#ifndef __EGAMI_IMAGE_MONO_H__ -#define __EGAMI_IMAGE_MONO_H__ +#pragma once #include #include @@ -49,8 +48,5 @@ namespace egami { const uint8_t& get(const ivec2& _pos) const; void set(const ivec2& _pos, const uint8_t& _newColor); }; - -}; - -#endif +} diff --git a/egami/ImagePrivate.h b/egami/ImagePrivate.h index 6cb3f6f..8aca89c 100644 --- a/egami/ImagePrivate.h +++ b/egami/ImagePrivate.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_IMAGE_PRIVATE_H__ -#define __EGAMI_IMAGE_PRIVATE_H__ +#pragma once #include #include @@ -279,4 +277,3 @@ namespace egami { } }; -#endif diff --git a/egami/debug.h b/egami/debug.h index d7c29b1..c5cc986 100644 --- a/egami/debug.h +++ b/egami/debug.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_DEBUG_H__ -#define __EGAMI_DEBUG_H__ +#pragma once #include @@ -39,5 +37,3 @@ namespace egami { } \ } while (0) -#endif - diff --git a/egami/egami.h b/egami/egami.h index 2328685..48d56a5 100644 --- a/egami/egami.h +++ b/egami/egami.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_H__ -#define __EGAMI_H__ +#pragma once #include #include @@ -16,8 +14,7 @@ #include #include -namespace egami -{ +namespace egami { /** * @brief Load a specific ilage file in the requested image data. * @param[out] _output Data of the image. @@ -47,7 +44,6 @@ namespace egami * @return false An error occured. */ bool generateDistanceFieldFile(const std::string& _input, const std::string& _output); -}; +} -#endif diff --git a/egami/wrapperBMP.h b/egami/wrapperBMP.h index 71b56a5..b0386ba 100644 --- a/egami/wrapperBMP.h +++ b/egami/wrapperBMP.h @@ -5,14 +5,11 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_WRAPPER_BMP_H__ -#define __EGAMI_WRAPPER_BMP_H__ +#pragma once #include -namespace egami -{ +namespace egami { /** * @breif Load a bmp file in the image. * @param[in] _fileName Name of the file. @@ -27,7 +24,6 @@ namespace egami * @return true if all is done correctly, false otherwise. */ bool storeBMP(const std::string& _fileName, const egami::Image& _inputImage); -}; +} -#endif diff --git a/egami/wrapperEDF.h b/egami/wrapperEDF.h index cd4bd92..0a91157 100644 --- a/egami/wrapperEDF.h +++ b/egami/wrapperEDF.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_WRAPPER_EDF_H__ -#define __EGAMI_WRAPPER_EDF_H__ +#pragma once #include @@ -35,7 +33,5 @@ namespace egami { * @return true if all is done correctly, false otherwise. */ bool storeEDF(const std::string& _fileName, const egami::Image& _inputImage); -}; - -#endif +} diff --git a/egami/wrapperPNG.h b/egami/wrapperPNG.h index b19b33f..a1f6c7f 100644 --- a/egami/wrapperPNG.h +++ b/egami/wrapperPNG.h @@ -5,14 +5,11 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_WRAPPER_PNG_H__ -#define __EGAMI_WRAPPER_PNG_H__ +#pragma once #include -namespace egami -{ +namespace egami { /** * @breif Load a png file in the image. * @param[in] _fileName Name of the file. @@ -20,7 +17,5 @@ namespace egami * @return true if all is done correctly, false otherwise. */ bool loadPNG(const std::string& _fileName, egami::Image& _ouputImage); -}; - -#endif +} diff --git a/egami/wrapperSVG.h b/egami/wrapperSVG.h index 500530f..3eb0818 100644 --- a/egami/wrapperSVG.h +++ b/egami/wrapperSVG.h @@ -5,14 +5,11 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EGAMI_WRAPPER_SVG_H__ -#define __EGAMI_WRAPPER_SVG_H__ +#pragma once #include -namespace egami -{ +namespace egami { /** * @breif Load a svg file in the image. * @param[in] _fileName Name of the file. @@ -21,6 +18,5 @@ namespace egami * @return true if all is done correctly, false otherwise. */ bool loadSVG(const std::string& _fileName, egami::Image& _ouputImage, const ivec2& _size=ivec2(-1,-1)); -}; +} -#endif \ No newline at end of file