Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Nov 21, 2023
1 parent 143e49f commit 2db104a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/ylt/struct_pack/packer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class packer {
else if constexpr (unique_ptr<type>) {
if (item != nullptr) {
if constexpr (is_base_class<typename type::element_type>) {
bool is_ok;
bool is_ok{};
auto index = search_type_by_md5<typename type::element_type>(
item->get_struct_pack_id(), is_ok);
assert(is_ok);
Expand Down
2 changes: 1 addition & 1 deletion include/ylt/struct_pack/unpacker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ class unpacker {
std::bitset<bitset_width> &vec, int &i, Arg &item, Args &...items) {
auto ec =
deserialize_one_fast_varint<parent_tag, no_skip, width>(vec, i, item);
if constexpr (sizeof...(items)) {
if constexpr (sizeof...(items) > 0) {
if SP_UNLIKELY (ec != errc{}) {
return ec;
}
Expand Down

0 comments on commit 2db104a

Please sign in to comment.