Itseez/opencv — pull request #3470 by Dmitry-Me (2014-12-01 15:00:16+00:00)
Title: Simplify overengineered code

The original code is correct but very hard to read. The new code is fully equivalent but easier to read and debug.

This was found using Cppcheck.