Closed Bug 1319408 Opened 3 years ago Closed 3 years ago

Convert some code in embedding/ to C++11

Categories

(Firefox Build System :: Source Code Analysis, defect)

defect
Not set

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
Attachment #8813165 - Flags: review?(jst)
Attachment #8813166 - Flags: review?(jst)
Attachment #8813167 - Flags: review?(jst)
Attachment #8813168 - Flags: review?(jst)
Attachment #8813165 - Flags: review?(jst) → review?(myk)
Attachment #8813166 - Flags: review?(jst) → review?(myk)
Attachment #8813167 - Flags: review?(jst) → review?(myk)
Attachment #8813168 - Flags: review?(jst) → review?(myk)
Comment on attachment 8813165 [details]
Bug 1319408 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in embedding/.

https://reviewboard.mozilla.org/r/94690/#review96078
Attachment #8813165 - Flags: review?(myk) → review+
Comment on attachment 8813168 [details]
Bug 1319408 - Replace integer literals which are cast to bool in embedding/.

https://reviewboard.mozilla.org/r/94696/#review96084
Attachment #8813168 - Flags: review?(myk) → review+
Comment on attachment 8813166 [details]
Bug 1319408 - Replace default bodies of special member functions with = default; in embedding/.

https://reviewboard.mozilla.org/r/94692/#review96080
Attachment #8813166 - Flags: review?(myk) → review+
Comment on attachment 8813167 [details]
Bug 1319408 - Replace string literals containing escaped characters with raw string literals in embedding/.

https://reviewboard.mozilla.org/r/94694/#review96082
Attachment #8813167 - Flags: review?(myk) → review+
(In reply to Andi-Bogdan Postelnicu from comment #0)
> 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

All reasonable changes.

Aside: any chance we'll be adding clang-tidy to CI, so we can catch any attempts to reintroduce such nits?
> Aside: any chance we'll be adding clang-tidy to CI, so we can catch any attempts to reintroduce such nits?
Yes, we tried first to evaluate the reaction of developers (very positive), we will see how to implement that in the best way possible.
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/556fa82a09ea
Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in embedding/. r=myk
https://hg.mozilla.org/integration/autoland/rev/2f5c53658a03
Replace default bodies of special member functions with = default; in embedding/. r=myk
https://hg.mozilla.org/integration/autoland/rev/096d333c2ba2
Replace string literals containing escaped characters with raw string literals in embedding/. r=myk
https://hg.mozilla.org/integration/autoland/rev/ac823431b8ad
Replace integer literals which are cast to bool in embedding/. r=myk
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.