diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-02-21 08:12:27 -0800 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-02-22 02:39:34 +0000 |
commit | 42f9b97dfb30b6ff9584319b15968b76bea37155 (patch) | |
tree | 2a0b35015545dfc81cd1e417933a093e829ba6f8 /basic | |
parent | 1e82ae8811e7c344805bba8ee0411c9b3682a80f (diff) |
WaE vs2015 truncation of literal on static_cast
Change-Id: I63a89c50c653145ea49aa34e4e4dd554da66598f
Reviewed-on: https://gerrit.libreoffice.org/22597
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/codegen.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 3f8c98683905..e11236f8a2d7 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -478,7 +478,14 @@ public: T result = 0 ; static const S max = std::numeric_limits< S >::max(); result = m_nNumOp0 + ( ( sizeof(S) + 1 ) * m_nNumSingleParams ) + ( (( sizeof(S) * 2 )+ 1 ) * m_nNumDoubleParams ); +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning( disable : 4309) +#endif return std::min(static_cast<T>(max), result); +#ifdef _MSC_VER +#pragma warning(push) +#endif } virtual bool processParams() override { return false; } }; |