Page MenuHomeFreeBSD

kyua: Switch from std::auto_ptr<> to std::unique_ptr<>
ClosedPublic

Authored by jhb on Apr 11 2025, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 9, 10:26 AM
Unknown Object (File)
Thu, Sep 3, 8:58 AM
Unknown Object (File)
Wed, Sep 2, 11:51 AM
Unknown Object (File)
Mon, Aug 31, 9:19 AM
Unknown Object (File)
Mon, Aug 31, 9:15 AM
Unknown Object (File)
Tue, Aug 25, 8:59 AM
Unknown Object (File)
Fri, Aug 21, 7:57 PM
Unknown Object (File)
Thu, Aug 20, 7:30 AM
Subscribers

Details

Summary

A few places were assigning auto_ptr<>s depending on the ownership
handoff. These now use an explicit std::move() as required by
unique_ptr<>.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 11 2025, 6:00 PM

A test VM is most of the way through a full kyua test run with this stack of changes applied and seems to be running fine.

Most of this change was mechanical (sed -e 's/auto_ptr/unique_ptr/') with a few places adjusted to use std::move() to fix compile errors.

This revision is now accepted and ready to land.Apr 24 2025, 12:22 AM