Last Comment Bug 657447 - Missing include guards in nsTimeRange class
: Missing include guards in nsTimeRange class
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: mozilla6
Assigned To: Paul Adenot (:padenot)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-16 13:03 PDT by Paul Adenot (:padenot)
Modified: 2011-05-17 06:37 PDT (History)
5 users (show)
mounir: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1, adding input guards (1.03 KB, patch)
2011-05-16 13:13 PDT, Paul Adenot (:padenot)
mounir: review-
Details | Diff | Splinter Review
Patch v1, adressing Mounir's concerns (1.27 KB, patch)
2011-05-16 14:54 PDT, Paul Adenot (:padenot)
mounir: review+
Details | Diff | Splinter Review
Patch v3 (1.26 KB, patch)
2011-05-16 15:05 PDT, Paul Adenot (:padenot)
mounir: review+
Details | Diff | Splinter Review

Description Paul Adenot (:padenot) 2011-05-16 13:03:56 PDT
There is no include guards in this .h file.
Comment 1 Paul Adenot (:padenot) 2011-05-16 13:13:54 PDT
Created attachment 532722 [details] [diff] [review]
Patch v1, adding input guards
Comment 2 Mounir Lamouri (:mounir) 2011-05-16 14:51:08 PDT
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".
Comment 3 Paul Adenot (:padenot) 2011-05-16 14:54:26 PDT
Created attachment 532750 [details] [diff] [review]
Patch v1, adressing Mounir's concerns
Comment 4 Mounir Lamouri (:mounir) 2011-05-16 14:59:19 PDT
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.
Comment 5 Paul Adenot (:padenot) 2011-05-16 15:05:49 PDT
Created attachment 532754 [details] [diff] [review]
Patch v3

I usually use #ifndef, but decided to be consistent with the other file of the module.

Anyway, here's the corrected version.
Comment 6 Mounir Lamouri (:mounir) 2011-05-16 15:21:06 PDT
Comment on attachment 532754 [details] [diff] [review]
Patch v3

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

Thanks :)
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-05-16 16:21:59 PDT
http://hg.mozilla.org/projects/cedar/rev/92f83b5cded7
Comment 8 Mounir Lamouri (:mounir) 2011-05-17 06:37:53 PDT
Pushed:
http://hg.mozilla.org/mozilla-central/rev/92f83b5cded7

Note You need to log in before you can comment on or make changes to this bug.