commit | 93d63c010ae24ff58acb70216bfcb93e3c73019a | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Thu Apr 18 16:39:30 2019 -0700 |
committer | Josh Gao <jmgao@google.com> | Wed Apr 24 12:59:42 2019 -0700 |
tree | 808e8d5767b36c7eda9a87b09a215333b5d78d7a | |
parent | 499601b94fa36759648542039d3df25e901ebb77 [diff] |
Add a way to turn off unique_fd's operator int. unique_fd's implicit conversion to int has led to tons of problems (see all of the overloads for close, fdopen, fdopendir, etc.). Add a switch that can turn it off, and reduce the ridiculous amount of work to fix up callers by introducing a borrowed_fd type that can be constructed from either int or unique_fd. Test: treehugger Change-Id: If77cf5cbcaddacdaec5919a15b3520fb68f51a62