From 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Sat, 20 Jun 2015 00:22:50 -0400 Subject: SERVER-18579: Clang-Format - reformat code, no comment reflow --- src/mongo/unittest/temp_dir.h | 61 +++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'src/mongo/unittest/temp_dir.h') diff --git a/src/mongo/unittest/temp_dir.h b/src/mongo/unittest/temp_dir.h index 070f0ea7217..a3dd3fcc2d2 100644 --- a/src/mongo/unittest/temp_dir.h +++ b/src/mongo/unittest/temp_dir.h @@ -32,36 +32,39 @@ namespace mongo { namespace unittest { +/** + * An RAII temporary directory that deletes itself and all contents files on scope exit. + */ +class TempDir { + MONGO_DISALLOW_COPYING(TempDir); + +public: + /** + * Creates a new unique temporary directory. + * + * Throws if this fails for any reason, such as bad permissions. + * + * The leaf of the directory path will start with namePrefix and have + * unspecified characters added to ensure uniqueness. + * + * namePrefix must not contain either / or \ + */ + explicit TempDir(const std::string& namePrefix); + /** - * An RAII temporary directory that deletes itself and all contents files on scope exit. + * Delete the directory and all contents. + * + * This only does best-effort. In particular no new files should be created in the directory + * once the TempDir goes out of scope. Any errors are logged and ignored. */ - class TempDir { - MONGO_DISALLOW_COPYING(TempDir); - public: - /** - * Creates a new unique temporary directory. - * - * Throws if this fails for any reason, such as bad permissions. - * - * The leaf of the directory path will start with namePrefix and have - * unspecified characters added to ensure uniqueness. - * - * namePrefix must not contain either / or \ - */ - explicit TempDir(const std::string& namePrefix); + ~TempDir(); - /** - * Delete the directory and all contents. - * - * This only does best-effort. In particular no new files should be created in the directory - * once the TempDir goes out of scope. Any errors are logged and ignored. - */ - ~TempDir(); - - const std::string& path() { return _path; } + const std::string& path() { + return _path; + } - private: - std::string _path; - }; -} // namespace unittest -} // namespace mongo +private: + std::string _path; +}; +} // namespace unittest +} // namespace mongo -- cgit v1.2.1