Bug 48253 - [EasyHack] Replace SAL_CONST_CAST and SAL_STATIC_CAST macro uses by their expansion
Summary: [EasyHack] Replace SAL_CONST_CAST and SAL_STATIC_CAST macro uses by their exp...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.6.0
Keywords: difficultyBeginner, easyHack, skillScript, topicCleanup
Depends on:
Blocks:
 
Reported: 2012-04-03 08:32 UTC by Don't use this account, use tml@iki.fi
Modified: 2015-12-16 00:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don't use this account, use tml@iki.fi 2012-04-03 08:32:11 UTC
In sal/inc/sal/types.h, we have: 

/* Historical macros, no need to use, old use cases should be replaced
 * by their expansions.
 */
#ifdef __cplusplus
#define SAL_CONST_CAST(type, expr) (const_cast< type >(expr))
#define SAL_STATIC_CAST(type, expr) (static_cast< type >(expr))
#endif /* __cplusplus */

Do what it says.

I.e., for each instance of SAL_CONST_CAST(xxx, yyy), replace it with const_cast<xxx>( yyy ). Similar for SAL_STATIC_CAST. Hopefully by using a clever Perl one-liner, or something, and not by editing manually...
Comment 1 Thomas Arnhold 2012-05-03 20:20:20 UTC
I did the changes with sed. Compiling locally now. Will push soon.
Comment 2 Not Assigned 2012-05-04 06:58:41 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/binfilter/commit/?id=681db8e3a2c727a1c30fb597a50b265857040094

fdo#48253: Expand SAL_CONST_CAST
Comment 3 Not Assigned 2012-05-04 06:59:05 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/binfilter/commit/?id=b5b4af6da1d44b47702ced8ea7cfc99c4788525a

fdo#48253: Expand SAL_STATIC_CAST
Comment 4 Not Assigned 2012-05-04 06:59:29 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/binfilter/commit/?id=99e42be7c4afcff0177992aebe8de9559b7a5f45

fdo#48253: Expand SAL_STATIC_CAST leftovers
Comment 5 Not Assigned 2012-05-04 07:00:15 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=135c63c8f9cc363c0895542b0f3bed48b61ea836

fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST
Comment 6 Robinson Tryon (qubit) 2015-12-16 00:20:05 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript TopicCleanup )
[NinjaEdit]