Page MenuHomeFreeBSD

[NFC] Use C++ features and headers in C++ code instead of C
Needs ReviewPublic

Authored by gfunni234_gmail.com on Aug 24 2021, 6:10 PM.
Tags
None
Referenced Files
F171253130: D31669.id94128.diff
Wed, Sep 9, 9:11 PM
Unknown Object (File)
Tue, Sep 8, 8:32 PM
Unknown Object (File)
Sun, Sep 6, 8:00 PM
Unknown Object (File)
Sat, Sep 5, 11:00 AM
Unknown Object (File)
Sat, Sep 5, 6:05 AM
Unknown Object (File)
Fri, Sep 4, 8:04 PM
Unknown Object (File)
Fri, Sep 4, 7:49 PM
Unknown Object (File)
Fri, Sep 4, 6:20 PM
Subscribers

Details

Reviewers
imp
jrtc27
dim
Summary

We don’t need to use integers as booleans or the C standard headers when we have the C++ standard headers and booleans

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

It's written this way because our C++ is deliberately very C-like. And it avoids all the std:: everywhere that's just a mess. Are there any useful changes you're making here other than changing it to match your personal views on style? The only somewhat useful thing I can see is changing some ints to bools, but even then it's all in tests so I really don't care all that much about a tiny increase in memory footprint.

usr.sbin/pmc/cmd_pmc_summary.cc
184

It's already applied to the prototype, just like all the other cmd_pmc_*