From ceb251d52f00a82c9505d948511aec2a2713fea3 Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Tue, 10 Oct 2023 14:06:34 -0500 Subject: [PATCH] Clang format --- .../std_variant_serialization.h | 247 +++++++++--------- .../kdl/src/kdl_factories.cpp | 8 +- 2 files changed, 122 insertions(+), 133 deletions(-) diff --git a/tesseract_common/include/tesseract_common/std_variant_serialization.h b/tesseract_common/include/tesseract_common/std_variant_serialization.h index 1729758fa53..1f82be14496 100644 --- a/tesseract_common/include/tesseract_common/std_variant_serialization.h +++ b/tesseract_common/include/tesseract_common/std_variant_serialization.h @@ -29,177 +29,166 @@ #include #include -namespace boost { -namespace serialization { - -template +namespace boost +{ +namespace serialization +{ +template struct std_variant_save_visitor { - std_variant_save_visitor(Archive& ar) : - m_ar(ar) - {} - template - void operator()(T const & value) const - { - m_ar << BOOST_SERIALIZATION_NVP(value); - } + std_variant_save_visitor(Archive& ar) : m_ar(ar) {} + template + void operator()(T const& value) const + { + m_ar << BOOST_SERIALIZATION_NVP(value); + } + private: - Archive & m_ar; + Archive& m_ar; }; - -template +template struct std_variant_load_visitor { - std_variant_load_visitor(Archive& ar) : - m_ar(ar) - {} - template - void operator()(T & value) const - { - m_ar >> BOOST_SERIALIZATION_NVP(value); - } + std_variant_load_visitor(Archive& ar) : m_ar(ar) {} + template + void operator()(T& value) const + { + m_ar >> BOOST_SERIALIZATION_NVP(value); + } + private: - Archive & m_ar; + Archive& m_ar; }; -template -void save( - Archive & ar, - std::variant const & v, - unsigned int /*version*/ -){ - const std::size_t which = v.index(); - ar << BOOST_SERIALIZATION_NVP(which); - std_variant_save_visitor visitor(ar); - std::visit(visitor, v); +template +void save(Archive& ar, std::variant const& v, unsigned int /*version*/ +) +{ + const std::size_t which = v.index(); + ar << BOOST_SERIALIZATION_NVP(which); + std_variant_save_visitor visitor(ar); + std::visit(visitor, v); } // Minimalist metaprogramming for handling parameter pack -namespace mp { - namespace detail { - template - struct front_impl; +namespace mp +{ +namespace detail +{ +template +struct front_impl; - template