Closed Bug 657447 Opened 13 years ago Closed 13 years ago

Missing include guards in nsTimeRange class

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: padenot, Assigned: padenot)

Details

Attachments

(1 file, 2 obsolete files)

There is no include guards in this .h file.
Assignee: nobody → paul
Attached patch Patch v1, adding input guards (obsolete) — Splinter Review
Attachment #532722 - Flags: review?(chris)
Comment on attachment 532722 [details] [diff] [review]
Patch v1, adding input guards

Review of attachment 532722 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/nsTimeRanges.h
@@ +41,5 @@
>  #include "nsTArray.h"
>  
> +#if !defined(nsTimeRanges_h__)
> +#define nsTimeRanges_h__
> +

Please put this before the list of #include and use "ifndef" instead of "!defined".
Attachment #532722 - Flags: review?(chris) → review-
Attachment #532722 - Attachment is obsolete: true
Attachment #532750 - Flags: review?(mounir.lamouri)
Comment on attachment 532750 [details] [diff] [review]
Patch v1, adressing Mounir's concerns

Review of attachment 532750 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/nsTimeRanges.h
@@ +37,5 @@
>   * ***** END LICENSE BLOCK ***** */
>  
> +#if !defined(nsTimeRanges_h__)
> +#define nsTimeRanges_h__
> +

Please, don't use !defined but ifndef instead.
Attachment #532750 - Flags: review?(mounir.lamouri) → review+
Attached patch Patch v3Splinter Review
I usually use #ifndef, but decided to be consistent with the other file of the module.

Anyway, here's the corrected version.
Attachment #532750 - Attachment is obsolete: true
Attachment #532754 - Flags: review?(mounir.lamouri)
Comment on attachment 532754 [details] [diff] [review]
Patch v3

Review of attachment 532754 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks :)
Attachment #532754 - Flags: review?(mounir.lamouri) → review+
Whiteboard: [fixed in cedar]
Pushed:
http://hg.mozilla.org/mozilla-central/rev/92f83b5cded7
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [fixed in cedar]
Target Milestone: --- → mozilla6
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: