From b19e14b9f1e8daa520f0e51a0db3cb7d7260fa3f Mon Sep 17 00:00:00 2001 From: stephenberry Date: Tue, 24 Sep 2024 20:01:15 +0000 Subject: [PATCH] Committing clang-format changes --- include/glaze/beve/read.hpp | 11 +++++------ include/glaze/beve/write.hpp | 8 ++++---- include/glaze/core/opts.hpp | 4 ++-- include/glaze/csv/read.hpp | 4 ++-- include/glaze/csv/write.hpp | 4 ++-- include/glaze/json/ndjson.hpp | 4 ++-- include/glaze/json/read.hpp | 10 +++++----- include/glaze/json/write.hpp | 6 +++--- tests/beve_test/beve_test.cpp | 3 +-- 9 files changed, 26 insertions(+), 28 deletions(-) diff --git a/include/glaze/beve/read.hpp b/include/glaze/beve/read.hpp index 098b8e8383..e0658529cb 100644 --- a/include/glaze/beve/read.hpp +++ b/include/glaze/beve/read.hpp @@ -39,7 +39,7 @@ namespace glz else { using V = std::remove_cvref_t; from::template op(std::forward(value), std::forward(tag), std::forward(ctx), - std::forward(it), std::forward(end)); + std::forward(it), std::forward(end)); } } @@ -59,7 +59,7 @@ namespace glz else { using V = std::remove_cvref_t; from::template op(std::forward(value), std::forward(ctx), std::forward(it), - std::forward(end)); + std::forward(end)); } } }; @@ -73,7 +73,7 @@ namespace glz { using V = std::decay_t(), meta_wrapper_v))>; from::template op(get_member(std::forward(value), meta_wrapper_v), - std::forward(ctx), std::forward(it), std::forward(end)); + std::forward(ctx), std::forward(it), std::forward(end)); } }; @@ -1274,8 +1274,7 @@ namespace glz static constexpr auto Length = TargetKey.size(); if ((Length == n) && compare(TargetKey.data(), key.data())) [[likely]] { if constexpr (detail::reflectable) { - read::op(get_member(value, get(detail::to_tuple(value))), ctx, it, - end); + read::op(get_member(value, get(detail::to_tuple(value))), ctx, it, end); } else { read::op(get_member(value, get(refl.values)), ctx, it, end); @@ -1469,7 +1468,7 @@ namespace glz [[nodiscard]] inline error_ctx read_binary_untagged(T&& value, Buffer&& buffer) noexcept { return read(std::forward(value), - std::forward(buffer)); + std::forward(buffer)); } template diff --git a/include/glaze/beve/write.hpp b/include/glaze/beve/write.hpp index f3379e400a..c31afb301c 100644 --- a/include/glaze/beve/write.hpp +++ b/include/glaze/beve/write.hpp @@ -93,14 +93,14 @@ namespace glz GLZ_ALWAYS_INLINE static void op(T&& value, Ctx&& ctx, B&& b, IX&& ix) noexcept { to>::template op(std::forward(value), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } template GLZ_ALWAYS_INLINE static void no_header(T&& value, Ctx&& ctx, B&& b, IX&& ix) noexcept { to>::template no_header(std::forward(value), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } }; @@ -113,7 +113,7 @@ namespace glz { using V = std::remove_cvref_t(), meta_wrapper_v))>; to::template op(get_member(std::forward(value), meta_wrapper_v), - std::forward(ctx), std::forward(b), std::forward(ix)); + std::forward(ctx), std::forward(b), std::forward(ix)); } }; @@ -947,7 +947,7 @@ namespace glz [[nodiscard]] error_ctx write_beve_untagged(T&& value, Buffer&& buffer) noexcept { return write(std::forward(value), - std::forward(buffer)); + std::forward(buffer)); } template diff --git a/include/glaze/core/opts.hpp b/include/glaze/core/opts.hpp index 54b0c310de..5264bddaf5 100644 --- a/include/glaze/core/opts.hpp +++ b/include/glaze/core/opts.hpp @@ -326,10 +326,10 @@ namespace glz { template struct to; - + template struct to_partial; - + template struct from; } diff --git a/include/glaze/csv/read.hpp b/include/glaze/csv/read.hpp index dad1e467f9..e2c4ce2548 100644 --- a/include/glaze/csv/read.hpp +++ b/include/glaze/csv/read.hpp @@ -42,7 +42,7 @@ namespace glz static void op(T&& value, Ctx&& ctx, It0&& it, It1 end) noexcept { from>::template op(std::forward(value), std::forward(ctx), - std::forward(it), std::forward(end)); + std::forward(it), std::forward(end)); } }; @@ -54,7 +54,7 @@ namespace glz { using V = decltype(get_member(std::declval(), meta_wrapper_v)); from::template op(get_member(value, meta_wrapper_v), std::forward(ctx), - std::forward(it), std::forward(end)); + std::forward(it), std::forward(end)); } }; diff --git a/include/glaze/csv/write.hpp b/include/glaze/csv/write.hpp index 83b407c98b..4ba0b0adb4 100644 --- a/include/glaze/csv/write.hpp +++ b/include/glaze/csv/write.hpp @@ -20,7 +20,7 @@ namespace glz static void op(T&& value, Ctx&& ctx, B&& b, IX&& ix) noexcept { to>::template op(std::forward(value), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } }; @@ -32,7 +32,7 @@ namespace glz { using V = decltype(get_member(std::declval(), meta_wrapper_v)); to::template op(get_member(value, meta_wrapper_v), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } }; diff --git a/include/glaze/json/ndjson.hpp b/include/glaze/json/ndjson.hpp index 57a806af33..2a4960a9a9 100644 --- a/include/glaze/json/ndjson.hpp +++ b/include/glaze/json/ndjson.hpp @@ -17,7 +17,7 @@ namespace glz static void op(T&& value, Ctx&& ctx, It0&& it, It1&& end) { from>::template op(std::forward(value), std::forward(ctx), - std::forward(it), std::forward(end)); + std::forward(it), std::forward(end)); } }; @@ -159,7 +159,7 @@ namespace glz static void op(T&& value, Ctx&& ctx, B&& b, IX&& ix) { to>::template op(std::forward(value), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } }; diff --git a/include/glaze/json/read.hpp b/include/glaze/json/read.hpp index 9760c334ca..61c911458a 100644 --- a/include/glaze/json/read.hpp +++ b/include/glaze/json/read.hpp @@ -67,7 +67,7 @@ namespace glz else { using V = std::remove_cvref_t; from::template op(std::forward(value), std::forward(ctx), std::forward(it), - std::forward(end)); + std::forward(end)); } } @@ -126,7 +126,7 @@ namespace glz { using V = std::decay_t(), meta_wrapper_v))>; from::template op(get_member(std::forward(value), meta_wrapper_v), - std::forward(ctx), std::forward(it), std::forward(end)); + std::forward(ctx), std::forward(it), std::forward(end)); } }; @@ -2730,8 +2730,8 @@ namespace glz using V = std::decay_t; constexpr bool is_object = glaze_object_t || reflectable; if constexpr (is_object) { - from::template op(), tag_literal>(v, ctx, it, - end); + from::template op(), tag_literal>(v, ctx, + it, end); } else if constexpr (is_memory_object) { if (!v) { @@ -2758,7 +2758,7 @@ namespace glz } } from>::template op(), - tag_literal>(*v, ctx, it, end); + tag_literal>(*v, ctx, it, end); } }, value); diff --git a/include/glaze/json/write.hpp b/include/glaze/json/write.hpp index e8b1b1a148..9484ef0de9 100644 --- a/include/glaze/json/write.hpp +++ b/include/glaze/json/write.hpp @@ -28,7 +28,7 @@ namespace glz GLZ_ALWAYS_INLINE static void op(T&& value, Ctx&& ctx, B&& b, IX&& ix) noexcept { to>::template op(std::forward(value), std::forward(ctx), - std::forward(b), std::forward(ix)); + std::forward(b), std::forward(ix)); } }; @@ -41,7 +41,7 @@ namespace glz { using V = std::remove_cvref_t(), meta_wrapper_v))>; to::template op(get_member(std::forward(value), meta_wrapper_v), - std::forward(ctx), std::forward(b), std::forward(ix)); + std::forward(ctx), std::forward(b), std::forward(ix)); } }; @@ -1402,7 +1402,7 @@ namespace glz } else { to::template op(get_member(value, get(refl.values)), ctx, b, - ix); + ix); } } }); diff --git a/tests/beve_test/beve_test.cpp b/tests/beve_test/beve_test.cpp index 520269739a..ba693e9bb7 100644 --- a/tests/beve_test/beve_test.cpp +++ b/tests/beve_test/beve_test.cpp @@ -1904,8 +1904,7 @@ suite read_allocated_tests = [] { full_struct input{"garbage", "ha!", 400, {1, 2, 3}}; auto s = glz::write_beve(input).value_or("error"); partial_struct obj{}; - expect( - !glz::read(obj, s)); + expect(!glz::read(obj, s)); expect(obj.string == "ha!"); expect(obj.integer == 400); };