Explicitly initialize prevector::_union to avoid new warning
Warning from gcc 7.1 is ./prevector.h:450:25: warning: '*((void*)(&<anonymous>)+8).prevector<28, unsigned char>::_union.prevector<28, unsigned char>::direct_or_indirect::<anonymous>.prevector<28, unsigned char>::direct_or_indirect::<unnamed struct>::indirect' may be used uninitialized in this function [-Wmaybe-uninitialized]
This commit is contained in:
parent
1016dacfac
commit
c73b8be244
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
prevector() : _size(0) {}
|
||||
prevector() : _size(0), _union{{}} {}
|
||||
|
||||
explicit prevector(size_type n) : _size(0) {
|
||||
resize(n);
|
||||
|
|
Loading…
Reference in a new issue