When this was ported to C++, it missed the actual variable assignments.
mentioned in commit 2a6718ff
mentioned in commit b75f2119