Skip to content

Commit c220dae

Browse files
committed
Fix sharing map compiler warnings
1 parent 100c39b commit c220dae

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/util/sharing_map.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ SHARING_MAPT2(, size_type)::erase(
450450
return 0;
451451

452452
node_type *del=nullptr;
453-
unsigned del_bit;
453+
unsigned del_bit=0;
454454

455455
size_t key=hash()(k);
456456
node_type *p=↦
@@ -472,18 +472,15 @@ SHARING_MAPT2(, size_type)::erase(
472472

473473
_sm_assert(p->is_container());
474474

475-
{
476-
const containert &c=as_const(p)->get_container();
475+
const containert &c=as_const(p)->get_container();
477476

478-
if(c.size()==1)
479-
{
480-
del->remove_child(del_bit);
481-
num--;
482-
return 1;
483-
}
477+
if(c.size()==1)
478+
{
479+
del->remove_child(del_bit);
480+
num--;
481+
return 1;
484482
}
485483

486-
containert &c=p->get_container();
487484
_sm_assert(c.size()>1);
488485
p->remove_leaf(k);
489486
num--;

0 commit comments

Comments
 (0)