Everywhere: Switch to #pragma once, add missing copyright headers

This commit is contained in:
Riyyi
2022-07-22 13:04:04 +02:00
parent bba2b30cbb
commit 8345f67c50
26 changed files with 58 additions and 107 deletions
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_ARRAY_H
#define UTIL_JSON_ARRAY_H
#pragma once
#include <utility> // move
#include <vector>
@@ -55,5 +54,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_ARRAY_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_FROM_JSON_H
#define UTIL_JSON_FROM_JSON_H
#pragma once
#include <algorithm> // transform
#include <cassert> // assert
@@ -118,8 +117,6 @@ constexpr const auto& fromJson = Util::Detail::staticConst<Detail::fromJsonFunct
} // namespace Util::JSON
#endif // UTIL_JSON_FROM_JSON_H
// Customization Points
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_JOB_H
#define UTIL_JSON_JOB_H
#pragma once
#include <cstddef> // size_t
#include <string_view>
@@ -49,5 +48,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_JOB_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_JSON_H
#define UTIL_JSON_JSON_H
#pragma once
#include "util/json/value.h"
@@ -14,5 +13,3 @@ namespace Util {
using Json = Util::JSON::Value;
} // namespace Util
#endif // UTIL_JSON_JSON_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_LEXER_H
#define UTIL_JSON_LEXER_H
#pragma once
// The JavaScript Object Notation (JSON) Data Interchange Format
// https://www.rfc-editor.org/rfc/pdfrfc/rfc8259.txt.pdf
@@ -63,5 +62,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_LEXER_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_OBJECT_H
#define UTIL_JSON_OBJECT_H
#pragma once
#include <map>
#include <string>
@@ -51,5 +50,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_OBJECT_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_PARSER_H
#define UTIL_JSON_PARSER_H
#pragma once
#include <cstddef> // size_t
#include <vector>
@@ -44,5 +43,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_PARSER_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_SERIALIZER_H
#define UTIL_JSON_SERIALIZER_H
#pragma once
#include <cstdint> // uint32_t
#include <string>
@@ -33,5 +32,3 @@ private:
};
} // namespace Util::JSON
#endif // UTIL_JSON_SERIALIZER_H
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_TO_JSON_H
#define UTIL_JSON_TO_JSON_H
#pragma once
#include <cassert> // assert
#include <cstddef> // nullptr_t
@@ -138,8 +137,6 @@ constexpr const auto& toJson = Util::Detail::staticConst<Detail::toJsonFunction>
} // namespace Util::JSON
#endif // UTIL_JSON_TO_JSON_H
// Customization Points
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html
+1 -4
View File
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef UTIL_JSON_VALUE_H
#define UTIL_JSON_VALUE_H
#pragma once
#include <cstddef> // nullptr_t, size_t
#include <cstdint> // uint32_t
@@ -148,5 +147,3 @@ inline Json::Value operator"" _json(const char* input, size_t length)
{
return Json::Value::parse(std::string(input, length));
}
#endif // UTIL_JSON_VALUE_H