「view this page in B3 βῆτα server」

Revisions №60595

branch: master 「№60595」
Commited by: Vikram K. Mulligan
GitHub commit link: 「2787c928a326c3bd」 「№3773」
Difference from previous tested commit:  code diff
Commit date: 2019-01-22 15:46:32

Merge pull request #3773 from RosettaCommons/vmullig/debug_mode_mathvector_overruns Correct bounds-checking on MathVectors MathVectors are zero-based, not one-based, but the bounds checking on the class assumes that indices 0 through (size) are valid. This corrects that. This turns out to be exactly what was wrong with my PolycubicSpline unit tests, too. This pull request corrects the indexing in the MathVector that I use in that test, so that I don't write past the end of an array. Finally, the bounds check was being performed in release and debug modes. This adds an #ifdef to ensure that the bounds check only happens in debug mode, for speed.

...