Closed
Bug 1318335
Opened 9 years ago
Closed 8 years ago
Convert some code in ipc/ to C++11
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox53 fixed)
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
Details
Attachments
(4 files)
Using the checkers provided by clang-tidy we can refresh the code to make it use the features of C++11 like:
- auto variables declarations
- default CTORS and DTORS
- using new range loop operators
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
QA Contact: bpostelnicu
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bpostelnicu
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Attachment #8811732 -
Flags: review?(wmccloskey)
Attachment #8811733 -
Flags: review?(wmccloskey)
Attachment #8811734 -
Flags: review?(wmccloskey)
Attachment #8811735 -
Flags: review?(wmccloskey)
Comment 9•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8811732 [details]
Bug 1318335 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in ipc/.
https://reviewboard.mozilla.org/r/93732/#review95018
::: ipc/glue/SharedMemoryBasic_mach.mm:454
(Diff revision 2)
> void
> SharedMemoryBasic::Shutdown()
> {
> StaticMutexAutoLock smal(gMutex);
>
> - for (auto it = gThreads.begin(); it != gThreads.end(); ++it) {
> + for (auto& gThread : gThreads) {
Local variables shouldn't be named gFoo. Please just call this |thread|. Same for the others below.
Attachment #8811732 -
Flags: review?(wmccloskey) → review-
Comment 10•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8811733 [details]
Bug 1318335 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in ipc/.
https://reviewboard.mozilla.org/r/93734/#review95020
Attachment #8811733 -
Flags: review?(wmccloskey) → review+
Comment 11•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8811734 [details]
Bug 1318335 - Replace default bodies of special member functions with = default; in ipc/.
https://reviewboard.mozilla.org/r/93736/#review95022
::: ipc/glue/BackgroundParentImpl.cpp:402
(Diff revision 2)
> }
> return NS_OK;
> }
>
> private:
> - ~InitUDPSocketParentCallback() {};
> + ~InitUDPSocketParentCallback() = default;;
Please remove the extra ;
Attachment #8811734 -
Flags: review?(wmccloskey) → review+
Comment 12•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8811735 [details]
Bug 1318335 - Use C++11's override and remove virtual where applicable in ipc/.
https://reviewboard.mozilla.org/r/93738/#review95024
Attachment #8811735 -
Flags: review?(wmccloskey) → review+
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 17•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8811732 [details]
Bug 1318335 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in ipc/.
https://reviewboard.mozilla.org/r/93732/#review96188
Attachment #8811732 -
Flags: review?(wmccloskey) → review+
Comment 18•8 years ago
|
||
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/841c964971a8
Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in ipc/. r=billm
https://hg.mozilla.org/integration/autoland/rev/d27c040abf57
Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in ipc/. r=billm
https://hg.mozilla.org/integration/autoland/rev/e8582a4033dc
Replace default bodies of special member functions with = default; in ipc/. r=billm
https://hg.mozilla.org/integration/autoland/rev/6deceff197dc
Use C++11's override and remove virtual where applicable in ipc/. r=billm
Comment 19•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/841c964971a8
https://hg.mozilla.org/mozilla-central/rev/d27c040abf57
https://hg.mozilla.org/mozilla-central/rev/e8582a4033dc
https://hg.mozilla.org/mozilla-central/rev/6deceff197dc
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
| Assignee | ||
Updated•8 years ago
|
QA Contact: bpostelnicu
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•