Replace macros with C++17 features (see issue #3362)

- Convert ALLOW_UNUSED_LOCAL to [[maybe_unused]]
- Convert WARN_UNUSED_RESULT to [[nodiscard]]
This commit is contained in:
Marshall Greenblatt
2022-07-27 12:52:42 -04:00
parent 02d7a758fe
commit a9043f2e80
8 changed files with 16 additions and 47 deletions

View File

@ -71,23 +71,23 @@ class CefScopedTempDir {
// Creates a unique directory in TempPath, and takes ownership of it.
// See file_util::CreateNewTemporaryDirectory.
///
bool CreateUniqueTempDir() WARN_UNUSED_RESULT;
[[nodiscard]] bool CreateUniqueTempDir();
///
// Creates a unique directory under a given path, and takes ownership of it.
///
bool CreateUniqueTempDirUnderPath(const CefString& path) WARN_UNUSED_RESULT;
[[nodiscard]] bool CreateUniqueTempDirUnderPath(const CefString& path);
///
// Takes ownership of directory at |path|, creating it if necessary.
// Don't call multiple times unless Take() has been called first.
///
bool Set(const CefString& path) WARN_UNUSED_RESULT;
[[nodiscard]] bool Set(const CefString& path);
///
// Deletes the temporary directory wrapped by this object.
///
bool Delete() WARN_UNUSED_RESULT;
[[nodiscard]] bool Delete();
///
// Caller takes ownership of the temporary directory so it won't be destroyed