-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sequential parse firstly #191
Conversation
bbbgan
commented
Jul 11, 2023
iguana/xml_reader.hpp
Outdated
bool parse_done = false; | ||
// sequential parse | ||
for_each(value, [&](const auto member_ptr, auto i) IGUANA__INLINE_LAMBDA { | ||
static_assert(std::is_member_pointer_v<std::decay_t<decltype(member_ptr)>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this assert is not necessary.
iguana/xml_reader.hpp
Outdated
constexpr auto Idx = decltype(i)::value; | ||
constexpr auto Count = M::value(); | ||
static_assert(Idx < Count); | ||
constexpr auto mkey = M::arr()[Idx]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify: constexpr auto mkey = iguana::get_name<T, i::value>();
iguana/xml_reader.hpp
Outdated
constexpr auto Count = M::value(); | ||
static_assert(Idx < Count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will update it later
we also need to add a ut: parsing an unsequential xml string. |
It's here Lines 383 to 384 in a794a2d
|
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #191 +/- ##
==========================================
+ Coverage 42.32% 42.49% +0.16%
==========================================
Files 43 44 +1
Lines 5186 5210 +24
==========================================
+ Hits 2195 2214 +19
- Misses 2991 2996 +5
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM