diff options
Diffstat (limited to 'include/tools/solar.h')
-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]; |