Bug 44981

Summary: EasyHack: remove obsolete SWAPLONG macros
Product: LibreOffice Reporter: Michael Meeks <michael.meeks>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: CLOSED FIXED    
Severity: normal Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Priority: medium    
Version: Master old -3.6   
Hardware: Other   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description Michael Meeks 2012-01-20 04:30:42 UTC
The tools/ code contains a lot of obsolete and/or duplicated code one example is:

tools/source/stream/stream.cxx

which uses this SWAPSHORT / SWAPLONG macro pair around the place.

It'd be great to kill all uses of these macros across the codebase to use the preferred 'sal' abstraction:

#   define OSL_SWAPWORD(w)         OSL_MAKEWORD(OSL_HIBYTE(w),OSL_LOBYTE(w))
#   define OSL_SWAPDWORD(d)        OSL_MAKEDWORD(OSL_SWAPWORD(OSL_HIWORD(d)),OSL_SWAPWORD(OSL_LOWORD(d)))

from osl/endian.h.
Comment 2 Robinson Tryon (qubit) 2015-12-15 16:27:29 UTC
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup)
[NinjaEdit]