From f5c690633d50df30f806560fdaa403b2fe55519c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 1 Aug 2023 20:40:05 +0100 Subject: Reformat with new clang-format --- slicer/db/sqlBinder.h | 2 ++ slicer/db/sqlCommon.cpp | 1 + slicer/db/sqlInsertSerializer.cpp | 1 + slicer/db/sqlInsertSerializer.h | 1 + slicer/db/sqlSelectDeserializer.h | 1 + slicer/db/sqlSource.h | 3 +++ slicer/db/sqlTablePatchSerializer.cpp | 3 +++ slicer/db/sqlTablePatchSerializer.h | 1 + slicer/db/sqlUpdateSerializer.h | 1 + slicer/db/testInsert.cpp | 1 + slicer/db/testMockCommon.h | 1 + slicer/db/testPatch.cpp | 2 ++ slicer/ice/testSpecifics.cpp | 1 + slicer/json/serializer.cpp | 4 ++++ slicer/slicer/enumMap.h | 1 + slicer/slicer/hook-test.cpp | 1 + slicer/slicer/hookMap.h | 1 + slicer/slicer/metadata.h | 1 + slicer/slicer/modelParts.h | 7 +++++-- slicer/slicer/modelPartsTypes.cpp | 35 +++++++++++++++++++++++++++++++++++ slicer/slicer/modelPartsTypes.h | 1 + slicer/slicer/modelPartsTypes.impl.h | 2 ++ slicer/slicer/serializer.h | 3 +++ slicer/slicer/slicer.cpp | 8 ++++++++ slicer/test/conversions.cpp | 18 ++++++++++-------- slicer/test/conversions.h | 1 + slicer/test/serializers.cpp | 2 ++ slicer/tool/icemetadata.cpp | 1 + slicer/tool/parser.cpp | 5 +++++ slicer/tool/parser.h | 2 ++ slicer/xml/serializer.cpp | 2 ++ slicer/xml/serializer.h | 1 + slicer/xml/testSpecifics.cpp | 1 + 33 files changed, 106 insertions(+), 10 deletions(-) diff --git a/slicer/db/sqlBinder.h b/slicer/db/sqlBinder.h index 4f5437c..71f23ea 100644 --- a/slicer/db/sqlBinder.h +++ b/slicer/db/sqlBinder.h @@ -6,6 +6,7 @@ #include #include #include + namespace DB { class Command; } @@ -33,6 +34,7 @@ namespace Slicer { DB::Command & command; const unsigned int idx; }; + typedef std::shared_ptr SqlBinderPtr; } diff --git a/slicer/db/sqlCommon.cpp b/slicer/db/sqlCommon.cpp index 40e43f7..21fb9e5 100644 --- a/slicer/db/sqlCommon.cpp +++ b/slicer/db/sqlCommon.cpp @@ -59,6 +59,7 @@ namespace Slicer { } AdHocFormatter(UnsuitableIdFieldTypeMsg, "Unsuitable id field type [%?]"); + void UnsuitableIdFieldType::ice_print(std::ostream & s) const { diff --git a/slicer/db/sqlInsertSerializer.cpp b/slicer/db/sqlInsertSerializer.cpp index 58e30e2..b4d46e6 100644 --- a/slicer/db/sqlInsertSerializer.cpp +++ b/slicer/db/sqlInsertSerializer.cpp @@ -88,6 +88,7 @@ namespace Slicer { private: DB::Connection * const connection; + template inline void doSet([[maybe_unused]] T & v, [[maybe_unused]] const char * Tname) const diff --git a/slicer/db/sqlInsertSerializer.h b/slicer/db/sqlInsertSerializer.h index b6a0d27..4a6a423 100644 --- a/slicer/db/sqlInsertSerializer.h +++ b/slicer/db/sqlInsertSerializer.h @@ -7,6 +7,7 @@ #include #include #include + namespace DB { class Connection; class ModifyCommand; diff --git a/slicer/db/sqlSelectDeserializer.h b/slicer/db/sqlSelectDeserializer.h index bf2b351..9e9d499 100644 --- a/slicer/db/sqlSelectDeserializer.h +++ b/slicer/db/sqlSelectDeserializer.h @@ -6,6 +6,7 @@ #include #include #include + namespace DB { class SelectCommand; } diff --git a/slicer/db/sqlSource.h b/slicer/db/sqlSource.h index 4b76974..70a0122 100644 --- a/slicer/db/sqlSource.h +++ b/slicer/db/sqlSource.h @@ -5,9 +5,11 @@ #include #include #include + namespace DB { class Column; } + namespace boost::posix_time { class ptime; class time_duration; @@ -36,6 +38,7 @@ namespace Slicer { private: const DB::Column & column; }; + typedef std::shared_ptr SqlSourcePtr; } diff --git a/slicer/db/sqlTablePatchSerializer.cpp b/slicer/db/sqlTablePatchSerializer.cpp index 3b73f05..a22f15a 100644 --- a/slicer/db/sqlTablePatchSerializer.cpp +++ b/slicer/db/sqlTablePatchSerializer.cpp @@ -11,6 +11,7 @@ namespace Slicer { AdHocFormatter(ttname, "slicer_tmp_%?"); + SqlTablePatchSerializer::SqlTablePatchSerializer(DB::Connection * const d, DB::TablePatch & tp) : db(d), tablePatch(tp) { @@ -47,6 +48,7 @@ namespace Slicer { } AdHocFormatter(createTmpTable, "CREATE TEMPORARY TABLE %? AS SELECT * FROM %? WHERE 1 = 0"); + void SqlTablePatchSerializer::createTemporaryTable() { @@ -54,6 +56,7 @@ namespace Slicer { } AdHocFormatter(dropTmpTable, "DROP TABLE %?"); + void SqlTablePatchSerializer::dropTemporaryTable() { diff --git a/slicer/db/sqlTablePatchSerializer.h b/slicer/db/sqlTablePatchSerializer.h index 21c8b3d..73e084d 100644 --- a/slicer/db/sqlTablePatchSerializer.h +++ b/slicer/db/sqlTablePatchSerializer.h @@ -4,6 +4,7 @@ #include #include #include + namespace DB { class Connection; class TablePatch; diff --git a/slicer/db/sqlUpdateSerializer.h b/slicer/db/sqlUpdateSerializer.h index 8707988..54a5f82 100644 --- a/slicer/db/sqlUpdateSerializer.h +++ b/slicer/db/sqlUpdateSerializer.h @@ -6,6 +6,7 @@ #include #include #include + namespace DB { class Connection; class ModifyCommand; diff --git a/slicer/db/testInsert.cpp b/slicer/db/testInsert.cpp index a9e42f1..24cae7e 100644 --- a/slicer/db/testInsert.cpp +++ b/slicer/db/testInsert.cpp @@ -25,6 +25,7 @@ using namespace std::literals; BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::DateTime) BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::IsoDate) BOOST_TEST_DONT_PRINT_LOG_VALUE(TestDatabase::Timespan) + // LCOV_EXCL_STOP namespace std { diff --git a/slicer/db/testMockCommon.h b/slicer/db/testMockCommon.h index e12d2c6..891fb74 100644 --- a/slicer/db/testMockCommon.h +++ b/slicer/db/testMockCommon.h @@ -5,6 +5,7 @@ #include #include #include + // IWYU pragma: no_forward_declare PQ::Mock namespace DB { class Connection; diff --git a/slicer/db/testPatch.cpp b/slicer/db/testPatch.cpp index 6db440a..3e8b1e4 100644 --- a/slicer/db/testPatch.cpp +++ b/slicer/db/testPatch.cpp @@ -11,9 +11,11 @@ #include #include #include + namespace TestDatabase { class Timespan; } + namespace TestModule { struct DateTime; struct IsoDate; diff --git a/slicer/ice/testSpecifics.cpp b/slicer/ice/testSpecifics.cpp index 2080993..6b6c0f0 100644 --- a/slicer/ice/testSpecifics.cpp +++ b/slicer/ice/testSpecifics.cpp @@ -18,6 +18,7 @@ // LCOV_EXCL_START // cppcheck-suppress unknownMacro BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::IsoDate) + // LCOV_EXCL_STOP template diff --git a/slicer/json/serializer.cpp b/slicer/json/serializer.cpp index e2db939..227f3c9 100644 --- a/slicer/json/serializer.cpp +++ b/slicer/json/serializer.cpp @@ -150,6 +150,7 @@ namespace Slicer { class DocumentTreeIterate { public: explicit DocumentTreeIterate(ModelPartPtr & mp) : modelPart(mp) { } + template void operator()(const SimpleT & v) const @@ -158,11 +159,13 @@ namespace Slicer { modelPart->SetValue(JsonValueSource(v)); modelPart->Complete(); } + void operator()(const json::Null &) const { modelPart->Complete(); } + void operator()(const json::Object & o) const { @@ -197,6 +200,7 @@ namespace Slicer { modelPart->Complete(); } } + void operator()(const json::Array & a) const { diff --git a/slicer/slicer/enumMap.h b/slicer/slicer/enumMap.h index 4c50bd8..e076a0c 100644 --- a/slicer/slicer/enumMap.h +++ b/slicer/slicer/enumMap.h @@ -52,6 +52,7 @@ namespace Slicer { EnumMap::begin = arr.begin(); EnumMap::end = arr.end(); } + const Arr arr; }; } diff --git a/slicer/slicer/hook-test.cpp b/slicer/slicer/hook-test.cpp index 3af28b4..2fa1b8b 100644 --- a/slicer/slicer/hook-test.cpp +++ b/slicer/slicer/hook-test.cpp @@ -15,6 +15,7 @@ namespace test { int AA; std::string b; }; + const std::string aa {"aa"}, aA {"aA"}, Aa {"Aa"}, AA {"AA"}, b {"b"}; using C = Slicer::ModelPartForComplex; diff --git a/slicer/slicer/hookMap.h b/slicer/slicer/hookMap.h index 92035de..5f71e17 100644 --- a/slicer/slicer/hookMap.h +++ b/slicer/slicer/hookMap.h @@ -13,6 +13,7 @@ namespace Slicer { void DLL_PUBLIC to_lower(std::string s); template class ModelPartForComplex; // IWYU pragma: keep + template class Hooks { public: using HookPtr = const typename ModelPartForComplex::HookBase *; diff --git a/slicer/slicer/metadata.h b/slicer/slicer/metadata.h index 6b209ae..8f24edb 100644 --- a/slicer/slicer/metadata.h +++ b/slicer/slicer/metadata.h @@ -109,6 +109,7 @@ namespace Slicer { template class DLL_PUBLIC MetaDataImpl : public MetaData<> { public: using Arr = ContainerBase; + constexpr inline explicit MetaDataImpl(const std::array & a) : arr {[&a]() { Arr rtn; diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h index 1986a95..e5e323f 100644 --- a/slicer/slicer/modelParts.h +++ b/slicer/slicer/modelParts.h @@ -24,6 +24,7 @@ namespace Slicer { virtual void get(const T &) const = 0; SPECIAL_MEMBERS_DEFAULT(TValueTarget); }; + class ValueTarget : public TValueTarget, public TValueTarget, @@ -51,6 +52,7 @@ namespace Slicer { virtual void set(T &) const = 0; SPECIAL_MEMBERS_DEFAULT(TValueSource); }; + class ValueSource : public TValueSource, public TValueSource, @@ -119,6 +121,7 @@ namespace Slicer { name(n), nameLower(nl), nameStr(ns) { } + virtual ~HookCommon() = default; SPECIAL_MEMBERS_DEFAULT(HookCommon); @@ -132,8 +135,7 @@ namespace Slicer { const std::string * nameStr; }; - template struct DLL_PUBLIC Default { - }; + template struct DLL_PUBLIC Default { }; class DLL_PUBLIC ModelPart : public std::enable_shared_from_this { public: @@ -175,6 +177,7 @@ namespace Slicer { template class DLL_PUBLIC ModelPartModel { public: explicit ModelPartModel(T * m = nullptr) : Model(m) { } + T * Model; }; diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp index 47543a6..aabbf57 100644 --- a/slicer/slicer/modelPartsTypes.cpp +++ b/slicer/slicer/modelPartsTypes.cpp @@ -17,6 +17,7 @@ #include #include #include + // IWYU pragma: no_forward_declare boost::multi_index::member // IWYU pragma: no_include @@ -172,57 +173,68 @@ namespace Slicer { ModelPartForSimpleBase::OnEachChild(const ChildHandler &) { } + ChildRef ModelPartForSimpleBase::GetAnonChildRef(const HookFilter &) { return ChildRef(); } + ChildRef ModelPartForSimpleBase::GetChildRef(std::string_view, const HookFilter &, bool) { return ChildRef(); } + bool ModelPartForSimpleBase::HasValue() const { return true; } + ModelPartType ModelPartForSimpleBase::GetType() const { return type; } + const ModelPartType ModelPartForSimpleBase::type = ModelPartType::Simple; void ModelPartForConvertedBase::OnEachChild(const ChildHandler &) { } + ChildRef ModelPartForConvertedBase::GetAnonChildRef(const HookFilter &) { return ChildRef(); } + ChildRef ModelPartForConvertedBase::GetChildRef(std::string_view, const HookFilter &, bool) { return ChildRef(); } + bool ModelPartForConvertedBase::HasValue() const { return true; } + ModelPartType ModelPartForConvertedBase::GetType() const { return type; } + void ModelPartForConvertedBase::conversion_fail(std::string_view typeName) { throw NoConversionFound(std::string {typeName}); } + const ModelPartType ModelPartForConvertedBase::type = ModelPartType::Simple; ModelPartType @@ -230,7 +242,9 @@ namespace Slicer { { return type; } + const ModelPartType ModelPartForComplexBase::type = ModelPartType::Complex; + void ModelPartForComplexBase::registerClass( const std::string & className, const std::string * typeName, const ClassRef & cr) @@ -240,6 +254,7 @@ namespace Slicer { Slicer::classNameMap()->insert({className, *typeName}); } } + void ModelPartForComplexBase::unregisterClass(const std::string & className, const std::string * typeName) { @@ -248,6 +263,7 @@ namespace Slicer { classNameMap()->get<0>().erase(className); } } + ModelPartPtr ModelPartForComplexBase::getSubclassModelPart(const std::string & name, void * m) { @@ -257,6 +273,7 @@ namespace Slicer { } return ref->second(m); } + TypeId ModelPartForComplexBase::getTypeId(const std::string & id, const std::string & className) { @@ -335,26 +352,31 @@ namespace Slicer { ModelPartForEnumBase::OnEachChild(const ChildHandler &) { } + ChildRef ModelPartForEnumBase::GetAnonChildRef(const HookFilter &) { return ChildRef(); } + ChildRef ModelPartForEnumBase::GetChildRef(std::string_view, const HookFilter &, bool) { return ChildRef(); } + bool ModelPartForEnumBase::HasValue() const { return true; } + ModelPartType ModelPartForEnumBase::GetType() const { return type; } + const ModelPartType ModelPartForEnumBase::type = ModelPartType::Simple; bool @@ -362,11 +384,13 @@ namespace Slicer { { return true; } + ModelPartType ModelPartForSequenceBase::GetType() const { return type; } + ChildRef ModelPartForSequenceBase::GetChildRef(std::string_view name, const HookFilter & flt, bool matchCase) { @@ -375,6 +399,7 @@ namespace Slicer { } return GetAnonChildRef(flt); } + const ModelPartType ModelPartForSequenceBase::type = ModelPartType::Sequence; bool @@ -382,11 +407,13 @@ namespace Slicer { { return true; } + ModelPartType ModelPartForDictionaryBase::GetType() const { return type; } + const ModelPartType ModelPartForDictionaryBase::type = ModelPartType::Dictionary; // Streams @@ -396,41 +423,49 @@ namespace Slicer { { throw InvalidStreamOperation(__FUNCTION__); } + // NOLINTNEXTLINE(hicpp-no-array-decay) ChildRef ModelPartForStreamBase::GetChildRef(std::string_view, const Slicer::HookFilter &, bool) { throw InvalidStreamOperation(__FUNCTION__); } + ModelPartType ModelPartForStreamBase::GetType() const { return ModelPartType::Sequence; } + bool ModelPartForStreamBase::HasValue() const { return true; } + // Stream Roots ModelPartForStreamRootBase::ModelPartForStreamRootBase(const ModelPartPtr & m) : ModelPartForRootBase(m) { } + // NOLINTNEXTLINE(hicpp-no-array-decay) void ModelPartForStreamRootBase::Write(Ice::OutputStream &) const { throw InvalidStreamOperation(__FUNCTION__); } + // NOLINTNEXTLINE(hicpp-no-array-decay) void ModelPartForStreamRootBase::Read(Ice::InputStream &) { throw InvalidStreamOperation(__FUNCTION__); } + bool ModelPartForStreamRootBase::HasValue() const { return mp->HasValue(); } + void ModelPartForStreamRootBase::OnEachChild(const ChildHandler & ch) { diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h index 0355c62..7e84794 100644 --- a/slicer/slicer/modelPartsTypes.h +++ b/slicer/slicer/modelPartsTypes.h @@ -154,6 +154,7 @@ namespace Slicer { }; template class Hooks; + template class ModelPartForComplex : public ModelPartForComplexBase { public: class HookBase; diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 5423152..95d0a37 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -26,6 +26,7 @@ #include #include #include + // IWYU pragma: no_forward_declare Slicer::EnumMap namespace Ice { class Object; @@ -405,6 +406,7 @@ namespace Slicer { { static_assert(sizeof...(MD) == N, "Wrong amount of metadata"); } + ~Hook() override = default; SPECIAL_MEMBERS_DEFAULT(Hook); diff --git a/slicer/slicer/serializer.h b/slicer/slicer/serializer.h index 27d70a6..f26a914 100644 --- a/slicer/slicer/serializer.h +++ b/slicer/slicer/serializer.h @@ -8,6 +8,7 @@ #include #include #include + // IWYU pragma: no_include "factory.impl.h" namespace Slicer { @@ -20,6 +21,7 @@ namespace Slicer { virtual void Serialize(ModelPartForRootPtr) = 0; }; + using SerializerPtr = std::shared_ptr; class DLL_PUBLIC Deserializer { @@ -31,6 +33,7 @@ namespace Slicer { virtual void Deserialize(ModelPartForRootPtr) = 0; }; + using DeserializerPtr = std::shared_ptr; using StreamSerializerFactory = AdHoc::Factory; diff --git a/slicer/slicer/slicer.cpp b/slicer/slicer/slicer.cpp index b36d6c6..6f890c3 100644 --- a/slicer/slicer/slicer.cpp +++ b/slicer/slicer/slicer.cpp @@ -29,6 +29,7 @@ namespace Slicer { } AdHocFormatter(InvalidEnumerationSymbolMsg, "Invalid enumeration symbol [%?] for type [%?]"); + void InvalidEnumerationSymbol::ice_print(std::ostream & s) const { @@ -36,6 +37,7 @@ namespace Slicer { } AdHocFormatter(InvalidEnumerationValueMsg, "Invalid enumeration symbol [%?] for type [%?]"); + void InvalidEnumerationValue::ice_print(std::ostream & s) const { @@ -43,6 +45,7 @@ namespace Slicer { } AdHocFormatter(UnknownTypeMsg, "Unknown type [%?]"); + void UnknownType::ice_print(std::ostream & s) const { @@ -50,6 +53,7 @@ namespace Slicer { } AdHocFormatter(NoConversionFoundMsg, "No conversion found for type [%?]"); + void NoConversionFound::ice_print(std::ostream & s) const { @@ -69,6 +73,7 @@ namespace Slicer { } AdHocFormatter(IncorrectElementNameMsg, "Incorrect element name [%?]"); + void IncorrectElementName::ice_print(std::ostream & s) const { @@ -94,6 +99,7 @@ namespace Slicer { } AdHocFormatter(CompilerErrorMsg, "Slicer compiler: %?"); + void CompilerError::ice_print(std::ostream & s) const { @@ -101,6 +107,7 @@ namespace Slicer { } AdHocFormatter(InvalidStreamOperationMsg, "%? is not valid on streams"); + void InvalidStreamOperation::ice_print(std::ostream & s) const { @@ -108,6 +115,7 @@ namespace Slicer { } AdHocFormatter(AbstractClassExceptionMsg, "%? is an abstract class"); + void AbstractClassException::ice_print(std::ostream & s) const { diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp index 6e74e26..a296197 100644 --- a/slicer/test/conversions.cpp +++ b/slicer/test/conversions.cpp @@ -13,6 +13,7 @@ #include #define SHORT(x) boost::numeric_cast<::Ice::Short, int64_t>(x) + inline auto USHORT(std::integral auto x) { @@ -40,8 +41,8 @@ namespace Slicer { std::string isoDateToString(const ::TestModule::IsoDate & in) { - struct tm tm { - }; + struct tm tm { }; + tm.tm_mday = in.day; tm.tm_mon = in.month - 1; tm.tm_year = in.year - 1900; @@ -56,8 +57,8 @@ namespace Slicer { ::TestModule::IsoDate stringToIsoDate(const std::string & in) { - struct tm tm { - }; + struct tm tm { }; + auto end = strptime(in.c_str(), "%Y-%m-%d", &tm); if (!end || *end) { // LCOV_EXCL_START @@ -71,8 +72,8 @@ namespace Slicer { std::string dateTimeToString(const ::TestModule::DateTime & in) { - struct tm tm { - }; + struct tm tm { }; + tm.tm_sec = in.second; tm.tm_min = in.minute; tm.tm_hour = in.hour; @@ -91,8 +92,8 @@ namespace Slicer { ::TestModule::DateTime stringToDateTime(const std::string & in) { - struct tm tm { - }; + struct tm tm { }; + auto end = strptime(in.c_str(), "%Y-%b-%d %H:%M:%S", &tm); if (!end || *end) { // LCOV_EXCL_START @@ -171,6 +172,7 @@ namespace TestModule { completions += 1; } } + namespace Slicer { template<> DLL_PUBLIC ModelPartPtr diff --git a/slicer/test/conversions.h b/slicer/test/conversions.h index cb46b93..bfa1c4b 100644 --- a/slicer/test/conversions.h +++ b/slicer/test/conversions.h @@ -28,6 +28,7 @@ namespace TestModule { void Complete() override; }; } + namespace Slicer { DLL_PUBLIC ::TestModule::DateTime stringToDateTime(const std::string & in); diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index 6efc02b..379551b 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -50,6 +50,7 @@ namespace fs = std::filesystem; // LCOV_EXCL_START BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::ClassMap::iterator) BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::SomeNumbers) + namespace std { template ostream & @@ -58,6 +59,7 @@ namespace std { return s; } } + // LCOV_EXCL_STOP class FileBased { diff --git a/slicer/tool/icemetadata.cpp b/slicer/tool/icemetadata.cpp index cecf703..4804542 100644 --- a/slicer/tool/icemetadata.cpp +++ b/slicer/tool/icemetadata.cpp @@ -1,6 +1,7 @@ #include "icemetadata.h" #include #include + // IWYU pragma: no_include namespace Slicer { diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp index ec94a43..28252b5 100644 --- a/slicer/tool/parser.cpp +++ b/slicer/tool/parser.cpp @@ -53,26 +53,31 @@ namespace Slicer { { return countIfUsed(c, classes, !c->isInterface()); } + [[nodiscard]] bool visitStructStart(const Slice::StructPtr & s) override { return countIfUsed(s, structs); } + void visitSequence(const Slice::SequencePtr & s) override { countIfUsed(s, sequences); } + void visitDictionary(const Slice::DictionaryPtr & d) override { countIfUsed(d, dictionaries); } + void visitEnum(const Slice::EnumPtr & e) override { countIfUsed(e, enums); } + [[nodiscard]] auto complexes() const { diff --git a/slicer/tool/parser.h b/slicer/tool/parser.h index a784d7a..e56c90a 100644 --- a/slicer/tool/parser.h +++ b/slicer/tool/parser.h @@ -10,6 +10,7 @@ #include #include #include + // IWYU pragma: no_include namespace Slicer { @@ -27,6 +28,7 @@ namespace Slicer { public: struct Args : public SplitString { explicit inline Args(std::string_view in) : SplitString {in, ","} { } + using SplitString::SplitString; }; diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index 96c1a9f..1ffa897 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -119,6 +119,7 @@ namespace Slicer { class XmlContentValueSource : public XmlValueSource { public: explicit XmlContentValueSource() : XmlValueSource(Glib::ustring()) { } + explicit XmlContentValueSource(const xmlpp::ContentNode * c) : XmlValueSource(c->get_content()) { } }; @@ -474,6 +475,7 @@ namespace Slicer { } AdHocFormatter(BadBooleanValueMsg, "Bad boolean value [%?]"); + void BadBooleanValue::ice_print(std::ostream & s) const { diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h index d07a77e..23a6140 100644 --- a/slicer/xml/serializer.h +++ b/slicer/xml/serializer.h @@ -19,6 +19,7 @@ #include #include #include + namespace Glib { class ustring; } diff --git a/slicer/xml/testSpecifics.cpp b/slicer/xml/testSpecifics.cpp index e2d7691..ec9fe11 100644 --- a/slicer/xml/testSpecifics.cpp +++ b/slicer/xml/testSpecifics.cpp @@ -16,6 +16,7 @@ #include #include #include + // IWYU pragma: no_forward_declare Slicer::BadBooleanValue // IWYU pragma: no_forward_declare Slicer::XmlDocumentDeserializer -- cgit v1.2.3