warning due to contrib/retina.hpp (Bug #1565)
Description
When I compile code with OpenCv and gcc -Wall -Wextra, I get the following warning :
.../include/opencv2/contrib/retina.hpp:332:117: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
It comes from :
const bool _convertCvMat2ValarrayBuffer(const cv::Mat inputMatToConvert, std::valarray<float> &outputValarrayMatrix);
The return type should be "bool" and not "const bool"
It is on svn truk version 7212.
Boris.
History
Updated by Alexander Shishkov about 13 years ago
Thank you for your response.
I changed it in 7263 revision.
It is good style (see "Effective C++" Meyers), it helps to prevent such errors:
_convertCvMat2ValarrayBuffer(...) = true;
But current compilers are not supported it, so I removed const here.
- Status changed from Open to Done
- (deleted custom field) set to fixed
Updated by Andrey Kamaev about 13 years ago
- Target version set to 2.4.0
- Description changed from When I compile code with [[OpenCv]] and gcc -Wall -Wextra, I get the followin... to When I compile code with OpenCv and gcc -Wall -Wextra, I get the following wa... More
- Category set to legacy, contrib