• Boudewijn Rempt's avatar
    Fix warning -Wclass-memaccess · ca741341
    Boudewijn Rempt authored
    In file included from /home/boud/dev/krita/libs/pigment/compositeops/KoCompositeOpCopy2.h:26,
                     from /home/boud/dev/krita/libs/pigment/colorspaces/KoAlphaColorSpace.cpp:35:
    /home/boud/dev/krita/libs/pigment/compositeops/KoCompositeOpBase.h: In instantiation of ‘void KoCompositeOpBase<_CSTraits, _compositeOp>::genericComposite(const KoCompositeOp::ParameterInfo&, const QBitArray&) const [with bool useMask = true; bool alphaLocked = true; bool allChannelFlags = true; _CSTraits = KoColorSpaceTrait<half, 1, 0>; _compositeOp = AlphaColorSpaceMultiplyOp<KoColorSpaceTrait<half, 1, 0> >]’:
    /home/boud/dev/krita/libs/pigment/compositeops/KoCompositeOpBase.h:67:72:   required from ‘void KoCompositeOpBase<_CSTraits, _compositeOp>::composite(const KoCompositeOp::ParameterInfo&) const [with _CSTraits = KoColorSpaceTrait<half, 1, 0>; _compositeOp = AlphaColorSpaceMultiplyOp<KoColorSpaceTrait<half, 1, 0> >]’
    /home/boud/dev/krita/libs/pigment/compositeops/KoCompositeOpBase.h:58:10:   required from here
    /home/boud/dev/krita/libs/pigment/compositeops/KoCompositeOpBase.h:110:27: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘KoCompositeOpBase<KoColorSpaceTrait<half, 1, 0>, AlphaColorSpaceMultiplyOp<KoColorSpaceTrait<half, 1, 0> > >::channels_type’ {aka ‘class half’} with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
                         memset(dst, 0, pixel_size);
                         ~~~~~~^~~~~~~~~~~~~~~~~~~~
    ca741341