Error on microsoft

Hello, I’ve added CI testing to an addon, I do not have any problem except for the windows platform, the
Environment: platform=x86, BUILDER=MSYS2 job works perfectly but these jobs:

Environment: platform=x64, BUILDER=VS, BITS=64
and
Environment: platform=x86, BUILDER=VS, BITS=32

Gives me an error. The thing is that the error is a bit strange:
https://ci.appveyor.com/project/edap/ofxspacecolonization/build/job/j2kebunfwoa01bj5

src\ofApp.cpp(66): error C2397: conversion from ‘double’ to ‘float’ requires a narrowing conversion [C:\projects\openFrameworks\addons\ofxSpaceColonization\example-ofxenvelope\example-ofxenvelope.vcxproj]

I’m looking at the documentation, https://msdn.microsoft.com/en-us/library/mt763946.aspx

And I assume that what make the compiler unhappy is the initialization of the struct that defines some options:

    auto optEnv = ofxEnvelopeOptions({ 
        400, 
        1.0, 
        0.002, 
        600, 
        0.3, 
        0.3 
    }); // this is line 66

That should contain these types:

struct ofxEnvelopeOptions{
    int curveHeight;
    float curveCutoffTop;
    float curvature;
    int nVertices;
    float deviationOnY;
    float deviationOnX;
};

But I do not see any double there.
Am I missing something?

usually you don’t use partenthesis and curly braces at the same time but also and i think that’s the error you are seeing, a real number by default is a double, to make it a float you need to add an f at the end so your initialization would become:

    auto optEnv = ofxEnvelopeOptions{ 
        400, 
        1.0f, 
        0.002f, 
        600, 
        0.3f, 
        0.3f 
    };

It worked, thanks :wink: