gnebehay / OpenTLD

A C++ implementation of OpenTLD
http://gnebehay.github.com/OpenTLD/
GNU General Public License v3.0
460 stars 196 forks source link

DetectorCascade is awkward to initialize #66

Open danielvarga opened 7 years ago

danielvarga commented 7 years ago

DetectorCascade.imageWidth/imgHeight/imgWidthStep initialization has to happen before DetectorCascade::init() calls, through writing into public members. Turning them into init() arguments would be cleaner software design IMHO. But what really made my missing initialization hard to spot was that this line was commented out:

https://github.com/gnebehay/OpenTLD/blob/master/src/libopentld/tld/DetectorCascade.cpp#L85