From e786cd605cf1af0d8f0568201ffc85a7bb0419fe 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' --- ejson/Array.h | 8 ++------ ejson/Boolean.h | 8 ++------ ejson/Null.h | 8 +++----- ejson/Number.h | 7 ++----- ejson/Object.h | 8 ++------ ejson/String.h | 8 ++------ ejson/Value.h | 6 +----- ejson/debug.h | 5 +---- ejson/ejson.h | 5 +---- test/testAll.h | 7 +------ test/testBoolean.h | 6 +----- test/testCommon.h | 6 +----- test/testDocument.h | 7 +------ test/testNull.h | 6 +----- test/testNumber.h | 6 +----- 15 files changed, 22 insertions(+), 79 deletions(-) diff --git a/ejson/Array.h b/ejson/Array.h index 68139f9..341c7bc 100644 --- a/ejson/Array.h +++ b/ejson/Array.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_ARRAY_H__ -#define __ETK_JSON_ARRAY_H__ +#pragma once #include #include @@ -169,7 +167,5 @@ namespace ejson { virtual bool transfertIn(std11::shared_ptr _obj); virtual std11::shared_ptr clone() const; }; -}; - -#endif +} diff --git a/ejson/Boolean.h b/ejson/Boolean.h index 8b80a67..d6c50d1 100644 --- a/ejson/Boolean.h +++ b/ejson/Boolean.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_BOOLEAN_H__ -#define __ETK_JSON_BOOLEAN_H__ +#pragma once #include #include @@ -53,7 +51,5 @@ namespace ejson { virtual bool transfertIn(std11::shared_ptr _obj); virtual std11::shared_ptr clone() const; }; -}; - -#endif +} diff --git a/ejson/Null.h b/ejson/Null.h index d17ae00..0938ba6 100644 --- a/ejson/Null.h +++ b/ejson/Null.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_NULL_H__ -#define __ETK_JSON_NULL_H__ +#pragma once #include #include @@ -31,7 +29,7 @@ namespace ejson { virtual bool transfertIn(std11::shared_ptr _obj); virtual std11::shared_ptr clone() const; }; -}; +} + -#endif diff --git a/ejson/Number.h b/ejson/Number.h index 415308b..48a374e 100644 --- a/ejson/Number.h +++ b/ejson/Number.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_NUMBER_H__ -#define __ETK_JSON_NUMBER_H__ +#pragma once #include #include @@ -65,7 +63,6 @@ namespace ejson { virtual bool transfertIn(std11::shared_ptr _obj); virtual std11::shared_ptr clone() const; }; -}; +} -#endif diff --git a/ejson/Object.h b/ejson/Object.h index 9006a2c..c2a5b48 100644 --- a/ejson/Object.h +++ b/ejson/Object.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_OBJECT_H__ -#define __ETK_JSON_OBJECT_H__ +#pragma once #include #include @@ -215,7 +213,5 @@ namespace ejson { virtual std11::shared_ptr clone() const; virtual std11::shared_ptr cloneObj() const; }; -}; - -#endif +} diff --git a/ejson/String.h b/ejson/String.h index 4958172..fd63292 100644 --- a/ejson/String.h +++ b/ejson/String.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_STRING_H__ -#define __ETK_JSON_STRING_H__ +#pragma once #include #include @@ -51,7 +49,5 @@ namespace ejson { virtual bool transfertIn(std11::shared_ptr _obj); virtual std11::shared_ptr clone() const; }; -}; - -#endif +} diff --git a/ejson/Value.h b/ejson/Value.h index 903109a..8c9fafc 100644 --- a/ejson/Value.h +++ b/ejson/Value.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_VALUE_H__ -#define __ETK_JSON_VALUE_H__ +#pragma once #include #include @@ -312,5 +310,3 @@ namespace ejson { #include #include -#endif - diff --git a/ejson/debug.h b/ejson/debug.h index dbbf715..62db01f 100644 --- a/ejson/debug.h +++ b/ejson/debug.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __EJSON_DEBUG_H__ -#define __EJSON_DEBUG_H__ +#pragma once #include @@ -39,4 +37,3 @@ namespace ejson { } \ } while (0) -#endif diff --git a/ejson/ejson.h b/ejson/ejson.h index de488b0..84ffbe5 100644 --- a/ejson/ejson.h +++ b/ejson/ejson.h @@ -5,9 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - -#ifndef __ETK_JSON_H__ -#define __ETK_JSON_H__ +#pragma once #include #include @@ -86,6 +84,5 @@ namespace ejson { //__LINE__, __class__, __func__ -#endif diff --git a/test/testAll.h b/test/testAll.h index d340f18..939e110 100644 --- a/test/testAll.h +++ b/test/testAll.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_ALL_H__ -#define __EJSON_TEST_ALL_H__ +#pragma once #include "testCommon.h" #include @@ -311,6 +308,4 @@ TEST(TestAll, testGeneric5) { localTest(base, base, -1); } -#endif - diff --git a/test/testBoolean.h b/test/testBoolean.h index c4e4868..7d75328 100644 --- a/test/testBoolean.h +++ b/test/testBoolean.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_BOOLEAN_H__ -#define __EJSON_TEST_BOOLEAN_H__ +#pragma once #include "testCommon.h" #include @@ -49,4 +46,3 @@ TEST(TestBoolean, testBaseFalse2) { localTest(refOutputBoolean2, "{ tmpElement:False }\n", 1); } -#endif \ No newline at end of file diff --git a/test/testCommon.h b/test/testCommon.h index 3ebd685..6c7ae65 100644 --- a/test/testCommon.h +++ b/test/testCommon.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_COMMON_H__ -#define __EJSON_TEST_COMMON_H__ +#pragma once #include #include @@ -57,4 +54,3 @@ static void localTest(const std::string& _ref, const std::string& _input, int32_ } } -#endif \ No newline at end of file diff --git a/test/testDocument.h b/test/testDocument.h index 4b5f734..8a70fc3 100644 --- a/test/testDocument.h +++ b/test/testDocument.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_DOCUMENT_H__ -#define __EJSON_TEST_DOCUMENT_H__ +#pragma once #include "testCommon.h" #include @@ -22,5 +19,3 @@ TEST(TestDocument, testTabbedDoc) { localTest(refOutputDocument, "{ \t\r }\n", -1); } - -#endif \ No newline at end of file diff --git a/test/testNull.h b/test/testNull.h index fd180f4..d590240 100644 --- a/test/testNull.h +++ b/test/testNull.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_NULL_H__ -#define __EJSON_TEST_NULL_H__ +#pragma once #include "testCommon.h" #include @@ -27,4 +24,3 @@ TEST(TestNull, testTabbedNullElementNoPThese) { localTest(refOutputNull, "tmpElement:null\n", -1); } -#endif \ No newline at end of file diff --git a/test/testNumber.h b/test/testNumber.h index 672948b..0dd973d 100644 --- a/test/testNumber.h +++ b/test/testNumber.h @@ -5,10 +5,7 @@ * * @license APACHE v2.0 (see license file) */ - - -#ifndef __EJSON_TEST_NUMBER_H__ -#define __EJSON_TEST_NUMBER_H__ +#pragma once #include "testCommon.h" #include @@ -30,4 +27,3 @@ TEST(TestNumber, testFloat) { localTest("{\n\t\"tmpElement\": -956.256000\n}\n", "{tmpElement : -956.256}\n", -1); } -#endif \ No newline at end of file