diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-03-01 10:51:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-03-01 13:53:41 +0100 |
commit | 5e363a4595e0a2ba2df4be940e81ec791eddfb82 (patch) | |
tree | 356c99c42b243af445b0c733c315fdae4de852c3 /sw | |
parent | 5f4df4b39722b9b3aa45d669e932d054d264ffbf (diff) |
Avoid explicit narrowing casts
They had been added back in the day with
0c0c6f2727e2b0e954e5ab7afcafe6738ddb9e98 "INTEGRATION: CWS swwarnings"
(adressing "#i69287# warning-free code"), but don't seem to actually silence any
warnings, at least nowadays. Better to keep such narrowing casts implicit, so
that tools like Clang's -fsanitize=implicit-integer-truncation can detect cases
at runtime where a too-large value erroneously gets truncated by such a cast.
Change-Id: I3bba6fff034e544cd935c0c4dbc98989052add5e
Reviewed-on: https://gerrit.libreoffice.org/68541
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index c944fb2178a1..15d7c4b513d9 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1088,10 +1088,10 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) for(sal_uInt16 i = 0; i < nCount; i++) { SwColumn aCol; - aCol.SetWishWidth(static_cast<sal_uInt16>(pArray[i].Width) ); - nWidthSum = static_cast<sal_uInt16>(nWidthSum + pArray[i].Width); - aCol.SetLeft (static_cast<sal_uInt16>(convertMm100ToTwip(pArray[i].LeftMargin))); - aCol.SetRight(static_cast<sal_uInt16>(convertMm100ToTwip(pArray[i].RightMargin))); + aCol.SetWishWidth(pArray[i].Width ); + nWidthSum = nWidthSum + pArray[i].Width; + aCol.SetLeft (convertMm100ToTwip(pArray[i].LeftMargin)); + aCol.SetRight(convertMm100ToTwip(pArray[i].RightMargin)); m_aColumns.insert(m_aColumns.begin() + i, aCol); } bRet = true; |