[mythtv] This piece of code is driving me nuts!

Ian Campbell ijc at hellion.org.uk
Sat Nov 19 09:14:50 UTC 2016


On Fri, 2016-11-18 at 20:10 +0000, roger wrote:
> 
> On 18/11/16 19:31, Gary Buhrmaster wrote:
> > On Fri, Nov 18, 2016 at 5:53 PM, roger <roger at beardandsandals.co.uk
> > wrote:
> >> This piece of code in mpgestreamdata.cpp is driving me nuts.
> > I suspect that you have not looked at the implementation
> > of a Qt vector resize method, which only sets values for
> > new elements.  So, from quick look, it sets the initial
> > (0-31, depending on endz) elements to 0x00, and than
> > the rest (to 32) to 0xff.
> 
> Unfortunately, sections_t is a std::vector not Qt QVector.

According to http://en.cppreference.com/w/cpp/container/vector/resize
std::vector::resize has the same behaviour as Gary describes for Qt
vector's resize, that is new elements are set to the given value.

Ian.


More information about the mythtv-dev mailing list