Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AnyVal::serialize(G3D::TextOutput& t) const {
- ...
- const Matrix3& m = *(Matrix3*)m_value;
- ...
- t.printf("%10.5f, %10.5f, %10.5f,\n"
- "%10.5f, %10.5f, %10.5f,\n"
- "%10.5f, %10.5f, %10.5f)",
- m[0, 0], m[0, 1], m[0, 2],
- m[1, 0], m[1, 1], m[1, 2],
- m[2, 0], m[2, 1], m[2, 2]);
- ...
- }
- This is what should have been written here: ...., m[0][0], m[0][1], ....
- This suspicious code was found in GLG3D project by PVS-Studio static code analyzer.
- Warning message is:
- V520 The comma operator ',' in array index expression '[0, 0]'. graphics3D anyval.cpp 275
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment