Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/common/clang-tidy.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Checks": "-*, concurrency-*, modernize-*, portability-*",
"Checks": "-*, concurrency-*, modernize-*, performance-*, portability-*",
"WarningsAsErrors": "*",
"FormatStyle": "none",
"UseColor": true
Expand Down
2 changes: 1 addition & 1 deletion src/core/json/include/sourcemeta/core/json_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SOURCEMETA_CORE_JSON_EXPORT JSON {
/// The object type used by the JSON document.
using Object = JSONObject<String, JSON, PropertyHashJSON<JSON::String>>;
/// The parsing phase of a JSON document.
enum class ParsePhase { Pre, Post };
enum class ParsePhase : std::uint8_t { Pre, Post };
// The enumeration indexes must stay in sync with the internal variant
/// The different types of a JSON instance.
enum class Type : std::uint8_t {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <algorithm> // std::copy, std::all_of
#include <cassert> // assert
#include <cstdint> // std::uint8_t
#include <initializer_list> // std::initializer_list
#include <iterator> // std::back_inserter
#include <optional> // std::optional, std::nullopt
Expand All @@ -16,7 +17,7 @@ namespace sourcemeta::core {
/// @ingroup jsonpointer
template <typename PointerT> class GenericPointerTemplate {
public:
enum class Wildcard { Property, Item, Key };
enum class Wildcard : std::uint8_t { Property, Item, Key };
struct Condition {
auto operator==(const Condition &) const noexcept -> bool = default;
auto operator<(const Condition &) const noexcept -> bool { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaFrame {
public:
/// The mode of framing. More extensive analysis can be compute and memory
/// intensive
enum class Mode { Locations, References, Instances };
enum class Mode : std::uint8_t { Locations, References, Instances };

SchemaFrame(const Mode mode) : mode_{mode} {}

Expand Down
3 changes: 2 additions & 1 deletion src/core/uri/include/sourcemeta/core/uri_escape.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
#include <sourcemeta/core/uri_export.h>
#endif

#include <cstdint> // std::uint8_t
#include <istream> // std::istream
#include <ostream> // std::ostream

namespace sourcemeta::core {

/// @ingroup uri
enum class URIEscapeMode {
enum class URIEscapeMode : std::uint8_t {
// Escape every characted that is not in the URI "unreserved" ABNF category
// See https://www.rfc-editor.org/rfc/rfc3986#appendix-A
SkipUnreserved,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

#include <sourcemeta/core/jsonschema.h>

#include <cstdint> // std::uint8_t

namespace sourcemeta::core {

/// @ingroup alterschema
/// The category of a built-in transformation rule
enum class AlterSchemaMode {
enum class AlterSchemaMode : std::uint8_t {
/// Rules that simplify the given schema for both human readability and
/// performance
Readability,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ class DraftOfficialDialectWithoutEmptyFragment final
auto transform(sourcemeta::core::JSON &schema) const -> void override {
auto schema_value = schema.at("$schema").to_string();
schema_value += "#";
schema.at("$schema").into(sourcemeta::core::JSON{std::move(schema_value)});
schema.at("$schema").into(sourcemeta::core::JSON{schema_value});
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ class ModernOfficialDialectWithEmptyFragment final
auto transform(sourcemeta::core::JSON &schema) const -> void override {
auto schema_value = schema.at("$schema").to_string();
schema_value.pop_back();
schema.at("$schema").into(sourcemeta::core::JSON{std::move(schema_value)});
schema.at("$schema").into(sourcemeta::core::JSON{schema_value});
}
};
Loading