Always use C++ casts instead of NS_*_CAST macros

VERIFIED FIXED in 0.7

Status

Calendar
Internal Components
VERIFIED FIXED
10 years ago
10 years ago

People

(Reporter: Stefan Sitter, Assigned: Stefan Sitter)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Always use C++ casts instead of NS_*_CAST macros

This is the Sunbird version of Bug 348748. The intention is to always use C++ casts and remove the NS_*_CAST macros. 

To keep branch and trunk in sync we should do the change ourself instead in a global trunk-only change in Bug 348748. The branch changes should be save because we already use C++ macros in our code.
(Assignee)

Comment 1

10 years ago
Created attachment 276788 [details] [diff] [review]
use C++ casts, rev0

Patch was created using the script convert-fixup.py 
(attachment 271413 [details] in Bug 348748)
Attachment #276788 - Flags: review?(daniel.boelzle)

Comment 2

10 years ago
Comment on attachment 276788 [details] [diff] [review]
use C++ casts, rev0

Thanks for the patch and pointing to that bug, Stefan! I greatly appreciate switching over to new-style casts and getting rid of those macros.

>Index: mozilla/calendar/base/src/calDateTime.cpp
>-            NS_REINTERPRET_CAST(PRUnichar const*,
>-                                JS_GetStringChars(JSVAL_TO_STRING(id))),
>+            reinterpret_cast<PRUnichar const*>
>+                            (JS_GetStringChars(JSVAL_TO_STRING(id))),
Just a small style nit: I'd like to see the opening brace on the same line (some more places in the patch); I could change that when checking in tomorrow.

r=dbo
Attachment #276788 - Flags: review?(daniel.boelzle) → review+

Comment 3

10 years ago
Checked in on HEAD and MOZILLA_1_8_BRANCH.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.7
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.