Closed Bug 1318299 Opened 8 years ago Closed 8 years ago

Convert some code in security/manager to C++11

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: andi, Assigned: andi)

References

Details

Attachments

(3 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
Summary: Convert some code in security/manager/ to C++11 → Convert some code in security/manager to C++11
Assignee: nobody → bpostelnicu
Attachment #8811681 - Flags: review?(dkeeler)
Attachment #8811682 - Flags: review?(dkeeler)
Attachment #8811683 - Flags: review?(dkeeler)
Comment on attachment 8811681 [details]
Bug 1318299 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in security/manager.

https://reviewboard.mozilla.org/r/93706/#review93934

::: security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp:80
(Diff revision 1)
>                           /*out*/ OCSPResponseType* OCSPType)
>  {
>    if (!OCSPType) {
>      return false;
>    }
> -  for (uint32_t i = 0; i < mozilla::ArrayLength(kOCSPResponseNameList); i++) {
> +  for (auto i : kOCSPResponseNameList) {

'i' isn't very descriptive. Let's maybe use 'ocspResponseName' to reflect the underlying type.
Attachment #8811681 - Flags: review?(dkeeler) → review+
Comment on attachment 8811682 [details]
Bug 1318299 - Replace string literals containing escaped characters with raw string literals in security/manager.

https://reviewboard.mozilla.org/r/93708/#review93964
Attachment #8811682 - Flags: review?(dkeeler) → review+
Comment on attachment 8811683 [details]
Bug 1318299 - Use C++11's override and remove virtual where applicable in security/manager.

https://reviewboard.mozilla.org/r/93710/#review93968

Great - thanks!
Attachment #8811683 - Flags: review?(dkeeler) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9fad88b953cc
Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in security/manager. r=keeler
https://hg.mozilla.org/integration/autoland/rev/beeffee0c4ee
Replace string literals containing escaped characters with raw string literals in security/manager. r=keeler
https://hg.mozilla.org/integration/autoland/rev/1c1707b6cef5
Use C++11's override and remove virtual where applicable in security/manager. r=keeler
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

Creator:
Created:
Updated:
Size: