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
F164186835: D31669.diff
Wed, Jul 29, 11:00 AM
Unknown Object (File)
Sat, Jul 25, 4:15 PM
Unknown Object (File)
Thu, Jul 23, 12:25 AM
Unknown Object (File)
Tue, Jul 21, 1:48 PM
Unknown Object (File)
Tue, Jul 21, 3:19 AM
Unknown Object (File)
Jun 27 2026, 11:33 PM
Unknown Object (File)
Jun 23 2026, 6:01 PM
Unknown Object (File)
Jun 21 2026, 6:51 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_*