diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-07-22 23:22:56 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-07-29 09:12:35 +0000 |
commit | 029fa6477bfed71881c3287799f5bdffd3285f92 (patch) | |
tree | 8145051f8d1bb9014868557baff2636a1ae6840a /include | |
parent | 57dd4d01c1ba036e5da4abf986b8d594d0ccdb95 (diff) |
solar.h: avoid some Wconversion warnings
Change-Id: Id41bd4e759dea72b37db5f329e29ff5c18c75a66
Reviewed-on: https://gerrit.libreoffice.org/17306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/solar.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/tools/solar.h b/include/tools/solar.h index c8d83ac4c4bc..717ad78aded6 100644 --- a/include/tools/solar.h +++ b/include/tools/solar.h @@ -47,12 +47,14 @@ typedef sal_uInt8 SVBT64[8]; #ifdef __cplusplus -inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0] - + ((sal_uInt16)p[1] << 8); } -inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0] +inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return static_cast<sal_uInt16> + ((sal_uInt16)p[0] + + ((sal_uInt16)p[1] << 8)); } +inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return static_cast<sal_uInt32> + ((sal_uInt32)p[0] + ((sal_uInt32)p[1] << 8) + ((sal_uInt32)p[2] << 16) - + ((sal_uInt32)p[3] << 24); } + + ((sal_uInt32)p[3] << 24)); } #if defined OSL_LITENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; reinterpret_cast<sal_uInt8*>(&n)[0] = p[0]; |