X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ffield.cpp;h=94d002167556a87fe3901359a25d9f28d49c4872;hb=830bc99366f13bfb3d6fc975441aba7388cb7ca1;hp=5a0c584f22813197ac9a7e3686aee29e6536fa75;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/field.cpp b/src/bin/lttng-sessiond/field.cpp index 5a0c584f2..94d002167 100644 --- a/src/bin/lttng-sessiond/field.cpp +++ b/src/bin/lttng-sessiond/field.cpp @@ -15,8 +15,8 @@ namespace lst = lttng::sessiond::trace; namespace { -template -bool fields_are_equal(const FieldTypeSet& a, const FieldTypeSet& b) +template +bool fields_are_equal(const FieldTypeContainerType& a, const FieldTypeContainerType& b) { if (a.size() != b.size()) { return false; @@ -25,8 +25,8 @@ bool fields_are_equal(const FieldTypeSet& a, const FieldTypeSet& b) return std::equal(a.cbegin(), a.cend(), b.cbegin(), - [](typename FieldTypeSet::const_reference field_a, - typename FieldTypeSet::const_reference field_b) { + [](typename FieldTypeContainerType::const_reference field_a, + typename FieldTypeContainerType::const_reference field_b) { return *field_a == *field_b; }); } @@ -47,9 +47,7 @@ lst::type::type(unsigned int in_alignment) : alignment{ in_alignment } { } -lst::type::~type() -{ -} +lst::type::~type() = default; bool lst::type::operator==(const lst::type& other) const noexcept { @@ -67,8 +65,8 @@ lst::field::field(std::string in_name, lst::type::cuptr in_type) : name{ std::move(in_name) }, _type{ std::move(in_type) } { if (!_type) { - LTTNG_THROW_ERROR( - fmt::format("Invalid type used to create field: field name = `{}`", name)); + LTTNG_THROW_ERROR(lttng::format( + "Invalid type used to create field: field name = `{}`", name)); } } @@ -92,7 +90,7 @@ const lst::type& lst::field::get_type() const if (_type) { return *_type; } else { - LTTNG_THROW_ERROR(fmt::format( + LTTNG_THROW_ERROR(lttng::format( "Invalid attempt to access field type after transfer: field name = `{}`", name)); } @@ -164,7 +162,7 @@ lst::floating_point_type::floating_point_type(unsigned int in_alignment, return; } - LTTNG_THROW_INVALID_ARGUMENT_ERROR(fmt::format( + LTTNG_THROW_INVALID_ARGUMENT_ERROR(lttng::format( "Invalid exponent/mantissa values provided while creating {}", typeid(*this))); }