Closed Bug 633315 Opened 13 years ago Closed 13 years ago

Make "namespace mozilla" usage consistent across DOMSVGxxxList.cpp files

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

Our usage of "namespace mozilla {" vs "using namespace mozilla;" is inconsistent between our various DOMSVG*List.cpp files.

I believe the former structure is preferred here.
Attached patch fix v1Splinter Review
Here's a patch to make this consistent (basically making all the other files match DOMSVGLengthList.cpp & DOMSVGAnimatedLengthList.cpp).

(Requesting approval2.0 at the same time as review.  Justification: minimal change, with no anticipated functional effect -- just keyword-usage cleanup, to help future changes that affect all of these files be marginally saner.)
Attachment #511503 - Flags: review?(roc)
Attachment #511503 - Flags: approval2.0?
Attachment #511503 - Flags: review?(roc)
Attachment #511503 - Flags: review+
Attachment #511503 - Flags: approval2.0?
Attachment #511503 - Flags: approval2.0+
http://hg.mozilla.org/mozilla-central/rev/b41a6a2499d1
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Summary: Make "namespace mozilla" usage consistent across DOMSVG*List.cpp files → Make "namespace mozilla" usage consistent across DOMSVGxxxList.cpp files
Target Milestone: --- → mozilla2.0b12
Yuck, really? Why is this the preferred way? I was planing on filing a bug to do the opposite.
(In reply to comment #3)
> Yuck, really?
> I was planing on filing a bug to do the opposite.

(I'm assuming you're talking about |namespace foo {| as opposed to |using namespace foo| in .cpp files)

Yes, really -- quoting the Coding Style MDC page:
> using namespace ...; is only allowed in .cpp files after all #includes.
> Prefer to wrap code in namespace ... { ... }; instead if possible.

(Note that second line in particular.)

> Why is this the preferred way?

I'm not exactly sure, to be honest, but I have a fuzzy impression that it's cleaner to have everything inside of a namespace{} scope.  #developers or m.d.platform may be able to give you a better answer. :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: