]> OCCT Git - occt.git/commit
0032916: Coding Rules - eliminate MSVS warning C26451 on VS2019/C++20 (Arithmetic...
authorddzama <ddzama@opencascade.com>
Thu, 31 Mar 2022 06:19:35 +0000 (09:19 +0300)
committersmoskvin <smoskvin@opencascade.com>
Fri, 8 Apr 2022 15:55:02 +0000 (18:55 +0300)
commitd31e5dbbb4da27d08e1a4d4faffd77d4ec6ed6a9
treec8118e9913c8fc9dd3a26e25419825c1ac4144e6
parent878ea8cd2b3b7c3b3b0c8a48a0649af85729968c
0032916: Coding Rules - eliminate MSVS warning C26451 on VS2019/C++20 (Arithmetic overflow: Using operator '+' on a 4 byte value...)

Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of `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/QANCollection/QANCollection_Stl.cxx