From ac6a5dfc854186f6746cbf1d534bcd77e082912b Mon Sep 17 00:00:00 2001 From: Kevin Hamacher Date: Fri, 12 Apr 2019 07:54:10 -0700 Subject: [PATCH] Delete copy constructor of FDCloser PiperOrigin-RevId: 243263443 Change-Id: If22d287ce1872ad070454824e8daa36585ab0258 --- sandboxed_api/sandbox2/util/fileops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sandboxed_api/sandbox2/util/fileops.h b/sandboxed_api/sandbox2/util/fileops.h index 670e306..ca71e5e 100644 --- a/sandboxed_api/sandbox2/util/fileops.h +++ b/sandboxed_api/sandbox2/util/fileops.h @@ -29,6 +29,9 @@ namespace fileops { class FDCloser { public: explicit FDCloser(int fd) : fd_{fd} {} + FDCloser(const FDCloser&) = delete; + FDCloser& operator=(const FDCloser&) = delete; + FDCloser(FDCloser&& other) : fd_(other.Release()) {} ~FDCloser(); int get() const { return fd_; }