From f17f03befaa0446a1802885aaac9707e99f9e1cb Mon Sep 17 00:00:00 2001 From: chrchr Date: Wed, 7 Jun 2023 18:38:22 +0200 Subject: [PATCH] C++11 sucks --- lib/library.h | 4 ++-- test/testsymboldatabase.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/library.h b/lib/library.h index cbc2e0469..2e38a7332 100644 --- a/lib/library.h +++ b/lib/library.h @@ -249,8 +249,8 @@ public: NO_YIELD }; struct Function { - Action action = Action::NO_ACTION; - Yield yield = Yield::NO_YIELD; + Action action; + Yield yield; std::string returnType; }; struct RangeItemRecordTypeItem { diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 0cf7de47a..6c664e169 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -8166,11 +8166,12 @@ private: vector.startPattern2 = "Vector !!::"; vector.type_templateArgNo = 0; vector.arrayLike_indexOp = true; - using Action = Library::Container::Action; - using Yield = Library::Container::Yield; - vector.functions["front"] = Library::Container::Function{ Action::NO_ACTION, Yield::ITEM, "" }; - vector.functions["data"] = Library::Container::Function{ Action::NO_ACTION, Yield::BUFFER, "" }; - vector.functions["begin"] = Library::Container::Function{ Action::NO_ACTION, Yield::START_ITERATOR, "" }; + vector.functions["front"] = + Library::Container::Function{Library::Container::Action::NO_ACTION, Library::Container::Yield::ITEM}; + vector.functions["data"] = + Library::Container::Function{Library::Container::Action::NO_ACTION, Library::Container::Yield::BUFFER}; + vector.functions["begin"] = Library::Container::Function{Library::Container::Action::NO_ACTION, + Library::Container::Yield::START_ITERATOR}; set.library.containers["Vector"] = vector; Library::Container string; string.startPattern = "test :: string";