mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-04 07:27:24 +01:00
Remove non-pragma header guards, and cleanup whitespace
This commit is contained in:
parent
dbe09e0bab
commit
d3a560d329
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_ADAPTER_HPP
|
||||
|
||||
#include <functional>
|
||||
|
||||
@ -472,5 +470,3 @@ struct AdapterTraits
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_BASIC_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_BASIC_ADAPTER_HPP
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sstream>
|
||||
@ -864,5 +862,3 @@ private:
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_FROZEN_VALUE_HPP
|
||||
#define __VALIJSON_ADAPTERS_FROZEN_VALUE_HPP
|
||||
|
||||
#include <valijson/adapters/adapter.hpp>
|
||||
|
||||
@ -52,5 +50,3 @@ public:
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_JSON11_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_JSON11_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
#include <json11.hpp>
|
||||
@ -709,5 +707,3 @@ inline Json11ObjectMemberIterator Json11Object::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -24,10 +24,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_JSONCPP_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_JSONCPP_ADAPTER_HPP
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
|
||||
@ -720,5 +718,3 @@ inline JsonCppObjectMemberIterator JsonCppObject::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_NLOHMANN_JSON_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_NLOHMANN_JSON_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
#include <json.hpp>
|
||||
@ -707,6 +705,3 @@ inline NlohmannJsonObjectMemberIterator NlohmannJsonObject::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_PICOJSON_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_PICOJSON_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -723,5 +721,3 @@ inline PicoJsonObjectMemberIterator PicoJsonObject::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_POCO_JSON_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_POCO_JSON_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
#include <Poco/JSON/Object.h>
|
||||
@ -34,10 +32,8 @@
|
||||
#include <valijson/adapters/basic_adapter.hpp>
|
||||
#include <valijson/adapters/frozen_value.hpp>
|
||||
|
||||
namespace valijson
|
||||
{
|
||||
namespace adapters
|
||||
{
|
||||
namespace valijson {
|
||||
namespace adapters {
|
||||
|
||||
class PocoJsonAdapter;
|
||||
class PocoJsonArrayValueIterator;
|
||||
@ -718,11 +714,5 @@ namespace valijson
|
||||
return PocoJsonAdapter(value).equalTo(other, strict);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif // __VALIJSON_ADAPTERS_POCO_JSON_ADAPTER_HPP
|
||||
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_PROPERTY_TREE_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_PROPERTY_TREE_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -753,5 +751,3 @@ inline PropertyTreeObjectMemberIterator PropertyTreeObject::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_QTJSON_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_QTJSON_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -33,7 +31,6 @@
|
||||
#include <QJsonValue>
|
||||
#include <QJsonArray>
|
||||
|
||||
|
||||
#include <valijson/adapters/adapter.hpp>
|
||||
#include <valijson/adapters/basic_adapter.hpp>
|
||||
#include <valijson/adapters/frozen_value.hpp>
|
||||
@ -721,5 +718,3 @@ inline QtJsonObjectMemberIterator QtJsonObject::find(
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -39,8 +39,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_ADAPTERS_RAPIDJSON_ADAPTER_HPP
|
||||
#define __VALIJSON_ADAPTERS_RAPIDJSON_ADAPTER_HPP
|
||||
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
@ -929,5 +927,3 @@ struct AdapterTraits<valijson::adapters::GenericRapidJsonAdapter<RapidJsonCrt> >
|
||||
|
||||
} // namespace adapters
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_CONSTRAINT_BUILDER_HPP
|
||||
#define __VALIJSON_CONSTRAINT_BUILDER_HPP
|
||||
|
||||
namespace valijson {
|
||||
|
||||
@ -21,5 +19,3 @@ public:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_CONSTRAINTS_BASIC_CONSTRAINT_HPP
|
||||
#define __VALIJSON_CONSTRAINTS_BASIC_CONSTRAINT_HPP
|
||||
|
||||
#include <valijson/constraints/constraint.hpp>
|
||||
#include <valijson/constraints/constraint_visitor.hpp>
|
||||
@ -65,5 +63,3 @@ protected:
|
||||
|
||||
} // namespace constraints
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -13,8 +13,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_CONSTRAINTS_CONCRETE_CONSTRAINTS_HPP
|
||||
#define __VALIJSON_CONSTRAINTS_CONCRETE_CONSTRAINTS_HPP
|
||||
|
||||
#include <limits>
|
||||
#include <map>
|
||||
@ -1093,5 +1091,3 @@ public:
|
||||
|
||||
} // namespace constraints
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_CONSTRAINTS_CONSTRAINT_HPP
|
||||
#define __VALIJSON_CONSTRAINTS_CONSTRAINT_HPP
|
||||
|
||||
namespace valijson {
|
||||
namespace constraints {
|
||||
@ -50,5 +48,3 @@ struct Constraint
|
||||
|
||||
} // namespace constraints
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_CONSTRAINTS_CONSTRAINT_VISITOR_HPP
|
||||
#define __VALIJSON_CONSTRAINTS_CONSTRAINT_VISITOR_HPP
|
||||
|
||||
namespace valijson {
|
||||
namespace constraints {
|
||||
@ -92,5 +90,3 @@ public:
|
||||
|
||||
} // namespace constraints
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef __VALIJSON_CUSTOM_ALLOCATOR_HPP
|
||||
#define __VALIJSON_CUSTOM_ALLOCATOR_HPP
|
||||
#pragma once
|
||||
|
||||
namespace valijson {
|
||||
namespace internal {
|
||||
@ -106,5 +105,3 @@ public:
|
||||
|
||||
} // end namespace internal
|
||||
} // end namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef __VALIJSON_DEBUG_HPP
|
||||
#define __VALIJSON_DEBUG_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -29,5 +28,3 @@ std::string nodeTypeAsString(const AdapterType &node) {
|
||||
|
||||
} // end namespace internal
|
||||
} // end namespace valijson
|
||||
|
||||
#endif
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_INTERNAL_JSON_POINTER_HPP
|
||||
#define __VALIJSON_INTERNAL_JSON_POINTER_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
@ -253,5 +251,3 @@ inline AdapterType resolveJsonPointer(
|
||||
} // namespace json_pointer
|
||||
} // namespace internal
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_INTERNAL_JSON_REFERENCE_HPP
|
||||
#define __VALIJSON_INTERNAL_JSON_REFERENCE_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
@ -57,9 +55,6 @@ namespace json_reference {
|
||||
return opt::optional<std::string>();
|
||||
}
|
||||
|
||||
|
||||
} // namespace json_reference
|
||||
} // namespace internal
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_OPTIONAL_HPP
|
||||
#define __VALIJSON_OPTIONAL_HPP
|
||||
|
||||
#if __cplusplus >= 201703
|
||||
// Visual C++ only supports __has_include in versions 14.12 and greater
|
||||
@ -14,5 +12,3 @@ namespace opt = std;
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_INTERNAL_URI_HPP
|
||||
#define __VALIJSON_INTERNAL_URI_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -33,5 +31,3 @@ namespace uri {
|
||||
} // namespace uri
|
||||
} // namespace internal
|
||||
} // namespace valijson
|
||||
|
||||
#endif // __VALIJSON_INTERNAL_URI_HPP
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_SCHEMA_HPP
|
||||
#define __VALIJSON_SCHEMA_HPP
|
||||
|
||||
#include <cstdio>
|
||||
#include <set>
|
||||
@ -209,5 +207,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_SCHEMA_PARSER_HPP
|
||||
#define __VALIJSON_SCHEMA_PARSER_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
@ -2116,5 +2114,3 @@ private:
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_SUBSCHEMA_HPP
|
||||
#define __VALIJSON_SUBSCHEMA_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -282,5 +280,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_FILE_UTILS_HPP
|
||||
#define __VALIJSON_FILE_UTILS_HPP
|
||||
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
@ -44,5 +42,3 @@ inline bool loadFile(const std::string &path, std::string &dest)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_JSON11_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_JSON11_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -34,6 +32,3 @@ inline bool loadDocument(const std::string &path, json11::Json &document)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_JSONCPP_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_JSONCPP_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -33,5 +31,3 @@ inline bool loadDocument(const std::string &path, Json::Value &document)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef VALIJSON_NLOHMANN_JSON_UTILS_HPP
|
||||
#define VALIJSON_NLOHMANN_JSON_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -10,7 +8,8 @@
|
||||
namespace valijson {
|
||||
namespace utils {
|
||||
|
||||
inline bool loadDocument(const std::string &path, nlohmann::json &document) {
|
||||
inline bool loadDocument(const std::string &path, nlohmann::json &document)
|
||||
{
|
||||
// Load schema JSON from file
|
||||
std::string file;
|
||||
if (!loadFile(path, file)) {
|
||||
@ -33,5 +32,3 @@ inline bool loadDocument(const std::string &path, nlohmann::json &document) {
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif //VALIJSON_NLOHMANN_JSON_UTILS_HPP
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_PICOJSON_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_PICOJSON_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -33,5 +31,3 @@ inline bool loadDocument(const std::string &path, picojson::value &document)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef VALIJSON_POCO_JSON_UTILS_HPP
|
||||
#define VALIJSON_POCO_JSON_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -13,7 +11,8 @@
|
||||
namespace valijson {
|
||||
namespace utils {
|
||||
|
||||
inline bool loadDocument(const std::string &path, Poco::Dynamic::Var &document) {
|
||||
inline bool loadDocument(const std::string &path, Poco::Dynamic::Var &document)
|
||||
{
|
||||
// Load schema JSON from file
|
||||
std::string file;
|
||||
if (!loadFile(path, file)) {
|
||||
@ -36,5 +35,3 @@ inline bool loadDocument(const std::string &path, Poco::Dynamic::Var &document)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif //VALIJSON_POCO_JSON_UTILS_HPP
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_PROPERTY_TREE_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_PROPERTY_TREE_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@ -36,5 +34,3 @@ inline bool loadDocument(const std::string &path, boost::property_tree::ptree &d
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_QTJSON_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_QTJSON_UTILS_HPP
|
||||
|
||||
#include <QFile>
|
||||
|
||||
@ -44,5 +42,3 @@ inline bool loadDocument(const std::string &path, QJsonValue &root)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_RAPIDJSON_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_RAPIDJSON_UTILS_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -35,5 +33,3 @@ inline bool loadDocument(const std::string &path, rapidjson::GenericDocument<Enc
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_UTILS_UTF8_UTILS_HPP
|
||||
#define __VALIJSON_UTILS_UTF8_UTILS_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@ -60,5 +58,3 @@ inline uint64_t u8_strlen(const char *s)
|
||||
|
||||
} // namespace utils
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_VALIDATION_RESULTS_HPP
|
||||
#define __VALIJSON_VALIDATION_RESULTS_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
@ -122,5 +120,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif // __VALIJSON_VALIDATION_RESULTS_HPP
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_VALIDATION_VISITOR_HPP
|
||||
#define __VALIJSON_VALIDATION_VISITOR_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
@ -241,7 +239,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Validate a value against a LinearItemsConstraint
|
||||
|
||||
*
|
||||
* A LinearItemsConstraint represents an 'items' constraint that specifies,
|
||||
* for each item in array, an individual sub-schema that the item must
|
||||
* validate against. The LinearItemsConstraint class also captures the
|
||||
@ -1702,5 +1700,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_VALIDATOR_HPP
|
||||
#define __VALIJSON_VALIDATOR_HPP
|
||||
|
||||
#include <valijson/schema.hpp>
|
||||
#include <valijson/validation_visitor.hpp>
|
||||
@ -74,5 +72,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace valijson
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user