Code style clean-up in nsLocation.cpp

RESOLVED WONTFIX

Status

()

Core
DOM
--
trivial
RESOLVED WONTFIX
11 years ago
11 years ago

People

(Reporter: sciguyryan, Assigned: sciguyryan)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Some of the code style in nsLocation.cpp does not seem to have a general code style and could thus be cleaned up.

I'll attach a patch shortly that cleans up some of the code style and fixes some problems caught by JST Review.
(Assignee)

Comment 1

11 years ago
Created attachment 263741 [details] [diff] [review]
Patch v1

Patch v1

Code style clean-up.
Attachment #263741 - Flags: superreview?(jst)
Attachment #263741 - Flags: review?(jst)

Comment 2

11 years ago
Comment on attachment 263741 [details] [diff] [review]
Patch v1


>     // Consider a null context the end of the line.
>-    if (!*aContext) {
>+    if (!*aContext)
>       break;
>-    }
> 
>-    if (nsJSUtils::GetDynamicScriptContext(*aContext)) {
>+    if (nsJSUtils::GetDynamicScriptContext(*aContext))
>       return NS_OK;
>-    }

...
>-    if (doc) {
>+    if (doc)
>       aCharset = doc->GetDocumentCharacterSet();
>-    }

Why these changes? (similar also elsewhere)
I'd keep the braces (or maybe in some cases those could be changed to NS_ENSURE_TRUE(expression, returnval), but
only when adding more noise to the debug console is ok.)
And is the coding style really that bad. Changing nsIFoo *aFoo to nsIFoo* aFoo isn't really needed, 
though I do prefer the first one too.
result -> rv isn't maybe worth the change.
Attachment #263741 - Flags: superreview?(jst)
Attachment #263741 - Flags: review?(jst)
Attachment #263741 - Flags: review-
(Assignee)

Comment 3

11 years ago
I think I'll close this as a WONTFIX after Smaug's comment :).
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.