Closed Bug 1346737 Opened 8 years ago Closed 7 years ago

Use a const in the for loop declaration to avoid copy in nsGlobalWindow.cpp

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement)

enhancement
Not set
normal

Tracking

(firefox55 affected)

RESOLVED FIXED
Tracking Status
firefox55 --- affected

People

(Reporter: Sylvestre, Assigned: andi)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Comment on attachment 8846586 [details] Bug 1346737 - Use a const in the for loop declaration to avoid copy in nsGlobalWindow.cpp https://reviewboard.mozilla.org/r/119626/#review121638 Nice!!!
Attachment #8846586 - Flags: review?(ehsan) → review+
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/753843fed8a9 Use a const in the for loop declaration to avoid copy in nsGlobalWindow.cpp r=Ehsan
Backed for build bustage: https://hg.mozilla.org/integration/autoland/rev/b982b56e56682eb9384ce348513cf2570fb9596b Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=753843fed8a927a6101d48c830e9d592edbf9ce8&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=84029184&repo=autoland [task 2017-03-15T14:48:29.991958Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp: In member function 'void nsGlobalWindow::DispatchVRDisplayPresentChange(uint32_t)': [task 2017-03-15T14:48:29.992785Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected unqualified-id before 'auto' [task 2017-03-15T14:48:29.992840Z] 14:48:29 INFO - for (const& auto display : mVRDisplays) { [task 2017-03-15T14:48:29.992876Z] 14:48:29 INFO - ^ [task 2017-03-15T14:48:29.992954Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected ';' before 'auto' [task 2017-03-15T14:48:29.993093Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected primary-expression before 'auto' [task 2017-03-15T14:48:29.993154Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected ';' before 'auto' [task 2017-03-15T14:48:29.993299Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected primary-expression before 'auto' [task 2017-03-15T14:48:29.993375Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:15: error: expected ')' before 'auto' [task 2017-03-15T14:48:29.993502Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13633:28: error: expected initializer before ':' token [task 2017-03-15T14:48:29.993543Z] 14:48:29 INFO - for (const& auto display : mVRDisplays) { [task 2017-03-15T14:48:29.993593Z] 14:48:29 INFO - ^ [task 2017-03-15T14:48:29.993658Z] 14:48:29 INFO - /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:14960:42: error: expected '}' at end of input [task 2017-03-15T14:48:29.993697Z] 14:48:29 INFO - template class nsPIDOMWindow<nsISupports>; [task 2017-03-15T14:48:29.993743Z] 14:48:29 INFO - ^ [task 2017-03-15T14:48:29.993791Z] 14:48:29 INFO - /home/worker/workspace/build/src/config/rules.mk:1016: recipe for target 'nsGlobalWindow.o' failed [task 2017-03-15T14:48:29.993829Z] 14:48:29 INFO - gmake[5]: *** [nsGlobalWindow.o] Error 1
Flags: needinfo?(sledru)
interesting, thanks!
Assignee: nobody → sledru
Flags: needinfo?(sledru)
Assignee: sledru → bpostelnicu
This bug can now be closed since this file is clean.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: