sjaehn / BChoppr

An audio stream chopping LV2 plugin
GNU General Public License v3.0
33 stars 3 forks source link

error: chosen constructor is explicit in copy-initialization #20

Closed yurivict closed 1 year ago

yurivict commented 1 year ago
gmake[1]: Entering directory '/usr/ports/audio/bchoppr-lv2/work/BChoppr-1.12.6'
Build BChoppr.lv2 DSP... done.
Build BChoppr.lv2 GUI...In file included from ../../src/BChoppr_GUI.cpp:21:
../../src/BChoppr_GUI.hpp:180:31: error: chosen constructor is explicit in copy-initialization
        BStyles::ColorMap fgColors = {{0.0, 0.75, 0.2, 1.0}, {0.2, 1.0, 0.6, 1.0}, {0.0, 0.5, 0.15, 1.0}, {0.0, 0.0, 0.0, 0.0}};
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/BWidgets/BStyles/Types/ColorMap.hpp:52:14: note: explicit constructor declared here
    explicit ColorMap (const std::initializer_list<const Color>& colors)
             ^
In file included from ../../src/BChoppr_GUI.cpp:21:
../../src/BChoppr_GUI.hpp:181:31: error: chosen constructor is explicit in copy-initialization
        BStyles::ColorMap bgColors = {{{0.15, 0.15, 0.15, 1.0}, {0.3, 0.3, 0.3, 1.0}, {0.05, 0.05, 0.05, 1.0}, {0.0, 0.0, 0.0, 0.0}}};
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/BWidgets/BStyles/Types/ColorMap.hpp:52:14: note: explicit constructor declared here
    explicit ColorMap (const std::initializer_list<const Color>& colors)
             ^
In file included from ../../src/BChoppr_GUI.cpp:21:
../../src/BChoppr_GUI.hpp:182:31: error: chosen constructor is explicit in copy-initialization
        BStyles::ColorMap txColors = {{0.0, 1.0, 0.4, 1.0}, {1.0, 1.0, 1.0, 1.0}, {0.0, 0.2, 0.05, 1.0}, {0.0, 0.0, 0.0, 0.0}};
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

clang-14 FreeBSD 13.1

sjaehn commented 1 year ago

Looks like you built an older version of this repo against the present version of the B.Widgets toolkit. The problem is already fixed in the current master:

BStyles::ColorMap fgColors = BStyles::ColorMap {{0.0, 0.75, 0.2, 1.0}, {0.2, 1.0, 0.6, 1.0}, {0.0, 0.5, 0.15, 1.0}, {0.0, 0.0, 0.0, 0.0}};
BStyles::ColorMap bgColors = BStyles::ColorMap {{{0.15, 0.15, 0.15, 1.0}, {0.3, 0.3, 0.3, 1.0}, {0.05, 0.05, 0.05, 1.0}, {0.0, 0.0, 0.0, 0.0}}};
BStyles::ColorMap txColors = BStyles::ColorMap {{0.0, 1.0, 0.4, 1.0}, {1.0, 1.0, 1.0, 1.0}, {0.0, 0.2, 0.05, 1.0}, {0.0, 0.0, 0.0, 0.0}};

(BTW, I see that there's a pair of redundant curly parentheses which I'll remove)