cppcheck reported this :
core/vcl/generic/fontmanager/fontconfig.cxx
196 duplicateExpression style Same expression on both sides of '-'
class SortFont : public ::std::binary_function< const FcPattern*, const
FcPattern*, bool >
{
public:
bool operator()(const FcPattern *a, const FcPattern *b)
{
int comp = compareFontNames(a, b);
if (comp != 0)
return comp < 0;
int nVersionA=0, nVersionB=0;
bool bHaveA = FcPatternGetInteger(a, FC_FONTVERSION, 0,
&nVersionA) == FcResultMatch;
bool bHaveB = FcPatternGetInteger(b, FC_FONTVERSION, 0,
&nVersionB) == FcResultMatch;
if (bHaveA && bHaveB)
return nVersionA > nVersionB;
196: return bHaveA - bHaveA;<--- Same expression on both sides of
'-'.
}
};
it seems it should be :
return bHaveA - bHaveB;
Any idea ?