]> OCCT Git - occt.git/commit
0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20
authorddzama <ddzama@opencascade.com>
Tue, 29 Mar 2022 13:32:46 +0000 (16:32 +0300)
committersmoskvin <smoskvin@opencascade.com>
Tue, 26 Apr 2022 21:59:45 +0000 (00:59 +0300)
commit4e1b5fcbf0cd7ec736e4d9c0d5683dd013c752a1
tree6646a33282abca1a9763698d4358653f3e9461de
parent9416ba5fb0b8982c7df80bb19374a33ba2319eb3
0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20

Put explicit type casting to avoid:
Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte
value and then casting the result to a 8 byte value.
Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
src/AIS/AIS_ViewController.cxx
src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx
src/Message/Message_ProgressScope.hxx
src/Standard/Standard_Real.hxx