From 4a6b016b9a33ed8d3959075ef46b6814dfff9c39 Mon Sep 17 00:00:00 2001 From: stephenberry Date: Fri, 14 Feb 2025 22:16:17 +0000 Subject: [PATCH] Committing clang-format changes --- include/glaze/json/read.hpp | 14 +++++++------- include/glaze/util/parse.hpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/glaze/json/read.hpp b/include/glaze/json/read.hpp index 22c18bd7d7..cf83312d94 100644 --- a/include/glaze/json/read.hpp +++ b/include/glaze/json/read.hpp @@ -2131,7 +2131,7 @@ namespace glz } const size_t ws_size = size_t(it - ws_start); - if constexpr ((glaze_object_t || reflectable) && num_members == 0 && Opts.error_on_unknown_keys) { + if constexpr ((glaze_object_t || reflectable)&&num_members == 0 && Opts.error_on_unknown_keys) { if constexpr (not tag.sv().empty()) { if (*it == '"') { ++it; @@ -2196,8 +2196,8 @@ namespace glz } else { decltype(auto) fields = [&]() -> decltype(auto) { - if constexpr ((glaze_object_t || reflectable) && - (Opts.error_on_missing_keys || Opts.partial_read)) { + if constexpr ((glaze_object_t || reflectable)&&(Opts.error_on_missing_keys || + Opts.partial_read)) { return bit_array{}; } else { @@ -2209,7 +2209,7 @@ namespace glz bool first = true; while (true) { - if constexpr ((glaze_object_t || reflectable) && Opts.partial_read) { + if constexpr ((glaze_object_t || reflectable)&&Opts.partial_read) { static constexpr bit_array all_fields = [] { bit_array arr{}; for (size_t i = 0; i < num_members; ++i) { @@ -2228,14 +2228,14 @@ namespace glz if constexpr (not Opts.null_terminated) { --ctx.indentation_level; } - if constexpr ((glaze_object_t || reflectable) && - (Opts.partial_read && Opts.error_on_missing_keys)) { + if constexpr ((glaze_object_t || + reflectable)&&(Opts.partial_read && Opts.error_on_missing_keys)) { ctx.error = error_code::missing_key; return; } else { ++it; - if constexpr ((glaze_object_t || reflectable) && Opts.error_on_missing_keys) { + if constexpr ((glaze_object_t || reflectable)&&Opts.error_on_missing_keys) { constexpr auto req_fields = required_fields(); if ((req_fields & fields) != req_fields) { ctx.error = error_code::missing_key; diff --git a/include/glaze/util/parse.hpp b/include/glaze/util/parse.hpp index 3a5d1439a1..ab71d2aaa1 100644 --- a/include/glaze/util/parse.hpp +++ b/include/glaze/util/parse.hpp @@ -419,7 +419,8 @@ namespace glz::detail ctx.error = error_code::unexpected_end; } else if (*it == '/') { - while (++it != end && *it != '\n'); + while (++it != end && *it != '\n') + ; } else if (*it == '*') { while (++it != end) {