free-wheeling / freewheeling

Freewheeling Live Looper
http://freewheeling.sourceforge.net/
GNU General Public License v2.0
106 stars 8 forks source link

fix warnings -Wdeprecated-copy #19

Open mathieugouin opened 4 years ago

mathieugouin commented 4 years ago

As discussed in https://github.com/free-wheeling/freewheeling/pull/18

if someone has some time, and a good knowledge of over-riding
C+ operators and copy constructors, i am interested to get advice
on  most recent change on the development branch:
"fix warnings -Wdeprecated-copy"

that patch avoids the warning by avoiding the offending custom
copy constructor entirely, by requiring clients to create their
own object, and pass a pointer into the offending methods instead
- so now, the custom copy constructor is not used at all; but it
does something clever (convoluted), which a default copy would
not - that indicates a smell, either in the original code (maybe
the custom copy constructor was never needed), or in a new bug
being introduced now (maybe it is needed in some cases; but now
it's special handling wont happen) - i have not had the bandwidth
to dig into it deeper; but i suspect that there is a less
intrusive way to fix that compiler warning
bill-auger commented 4 years ago

i tried it earlier - the current change is not good - it throws many errors; so probably it broke the configuration system