<div class="gmail_quote">On Mon, Feb 7, 2011 at 12:23 AM, Silvio Heinrich <span dir="ltr"><<a href="mailto:plassy@web.de">plassy@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Arg... the last two versions won't compile, here the fixed versions:<br>
<div class="im"><br>
#ifndef _KO_COMPOSITEOPS_H_<br>
#define _KO_COMPOSITEOPS_H_<br>
<br>
#include <KoColorSpace.h><br>
#include <KoColorSpaceTraits.h><br>
</div>#include <KoColorSpaceMaths.h><br>
<div class="im">#include "compositeops/KoCompositeOpFunctions.h"<br>
#include "compositeops/KoCompositeOpGeneric.h"<br>
<br>
</div><div class="im">template<class T><br>
T cfTest(T src, T dst)<br>
{<br>
return dst;<br>
}<br>
<br>
</div><div class="im">template<class Traits><br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div> cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,<br>
<div class="im">COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),<br>
KoCompositeOp::categoryLight(), true));<br>
}<br>
<br>
// _KO_COMPOSITEOPS_H_<br>
<br>
and:<br>
<br>
#ifndef _KO_COMPOSITEOPS_H_<br>
#define _KO_COMPOSITEOPS_H_<br>
<br>
#include <KoColorSpace.h><br>
#include <KoColorSpaceTraits.h><br>
</div>#include <KoColorSpaceMaths.h><br>
<div class="im">#include "compositeops/KoCompositeOpFunctions.h"<br>
#include "compositeops/KoCompositeOpGeneric.h"<br>
<br>
</div><div class="im">template<class T><br>
T cfTest(T src, T dst)<br>
{<br>
return KoColorSpaceMathsTraits<T>::zeroValue;<br>
}<br>
<br>
</div><div class="im">template<class Traits><br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div> cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,<br>
<div class="im">COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),<br>
KoCompositeOp::categoryLight(), true));<br>
}<br>
<br>
// _KO_COMPOSITEOPS_H_<br>
<br>
</div>Sorry for all the hassle :/<br>
<div><div></div><br></div></blockquote><div><br>Both compile. <br></div></div>