diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-27 12:21:37 -0400 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-28 10:13:21 -0400 |
commit | f922827d45ce752e148185dfa3a785f7c9cf29fd (patch) | |
tree | b3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/logger | |
parent | f2f422d92b639edba0a10d40a43803723cb15baf (diff) | |
download | mongo-f922827d45ce752e148185dfa3a785f7c9cf29fd.tar.gz |
SERVER-40357 expand all calls to MONGO_DISALLOW_COPYING
produced by:
hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )"
for f in "$hits"; do
sed -i.orig '
s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/;
' $f
done
Diffstat (limited to 'src/mongo/logger')
-rw-r--r-- | src/mongo/logger/component_message_log_domain.h | 3 | ||||
-rw-r--r-- | src/mongo/logger/console_appender.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/log_component_settings.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/log_domain.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/log_manager.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/ramlog.h | 7 | ||||
-rw-r--r-- | src/mongo/logger/rotatable_file_appender.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/rotatable_file_manager.h | 4 | ||||
-rw-r--r-- | src/mongo/logger/rotatable_file_writer.cpp | 6 | ||||
-rw-r--r-- | src/mongo/logger/rotatable_file_writer.h | 7 | ||||
-rw-r--r-- | src/mongo/logger/syslog_appender.h | 4 |
11 files changed, 28 insertions, 23 deletions
diff --git a/src/mongo/logger/component_message_log_domain.h b/src/mongo/logger/component_message_log_domain.h index 8bfb85c419c..7cd2858090b 100644 --- a/src/mongo/logger/component_message_log_domain.h +++ b/src/mongo/logger/component_message_log_domain.h @@ -39,7 +39,8 @@ namespace logger { * Logging domain for ephemeral messages with minimum severity. */ class ComponentMessageLogDomain : public MessageLogDomain { - MONGO_DISALLOW_COPYING(ComponentMessageLogDomain); + ComponentMessageLogDomain(const ComponentMessageLogDomain&) = delete; + ComponentMessageLogDomain& operator=(const ComponentMessageLogDomain&) = delete; public: ComponentMessageLogDomain(); diff --git a/src/mongo/logger/console_appender.h b/src/mongo/logger/console_appender.h index 358079c81ac..26a75ede2c5 100644 --- a/src/mongo/logger/console_appender.h +++ b/src/mongo/logger/console_appender.h @@ -30,7 +30,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/logger/appender.h" #include "mongo/logger/console.h" @@ -44,7 +43,8 @@ namespace logger { */ template <typename Event, typename ConsoleType = Console> class ConsoleAppender : public Appender<Event> { - MONGO_DISALLOW_COPYING(ConsoleAppender); + ConsoleAppender(const ConsoleAppender&) = delete; + ConsoleAppender& operator=(const ConsoleAppender&) = delete; public: typedef Encoder<Event> EventEncoder; diff --git a/src/mongo/logger/log_component_settings.h b/src/mongo/logger/log_component_settings.h index d945b9e7a71..23440129d54 100644 --- a/src/mongo/logger/log_component_settings.h +++ b/src/mongo/logger/log_component_settings.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/logger/log_component.h" #include "mongo/logger/log_severity.h" #include "mongo/platform/atomic_word.h" @@ -44,7 +43,8 @@ namespace logger { * provide log severities for the other components (up to but not including kNumLogComponents). */ class LogComponentSettings { - MONGO_DISALLOW_COPYING(LogComponentSettings); + LogComponentSettings(const LogComponentSettings&) = delete; + LogComponentSettings& operator=(const LogComponentSettings&) = delete; public: LogComponentSettings(); diff --git a/src/mongo/logger/log_domain.h b/src/mongo/logger/log_domain.h index c4d3bea4ee3..01f0d35a80e 100644 --- a/src/mongo/logger/log_domain.h +++ b/src/mongo/logger/log_domain.h @@ -33,7 +33,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/logger/appender.h" #include "mongo/logger/log_severity.h" @@ -61,7 +60,8 @@ namespace logger { */ template <typename E> class LogDomain { - MONGO_DISALLOW_COPYING(LogDomain); + LogDomain(const LogDomain&) = delete; + LogDomain& operator=(const LogDomain&) = delete; public: typedef E Event; diff --git a/src/mongo/logger/log_manager.h b/src/mongo/logger/log_manager.h index c8bc6b05f53..6cf7565c5c4 100644 --- a/src/mongo/logger/log_manager.h +++ b/src/mongo/logger/log_manager.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/logger/component_message_log_domain.h" #include "mongo/logger/rotatable_file_writer.h" #include "mongo/stdx/unordered_map.h" @@ -45,7 +44,8 @@ namespace logger { * Use this while setting up the logging system, before launching any threads. */ class LogManager { - MONGO_DISALLOW_COPYING(LogManager); + LogManager(const LogManager&) = delete; + LogManager& operator=(const LogManager&) = delete; public: LogManager(); diff --git a/src/mongo/logger/ramlog.h b/src/mongo/logger/ramlog.h index 12365944879..15ad0d8526e 100644 --- a/src/mongo/logger/ramlog.h +++ b/src/mongo/logger/ramlog.h @@ -34,7 +34,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/base/string_data.h" #include "mongo/logger/appender.h" @@ -57,7 +56,8 @@ namespace mongo { * To read a RamLog, instantiate a RamLog::LineIterator, documented below. */ class RamLog : public logger::Tee { - MONGO_DISALLOW_COPYING(RamLog); + RamLog(const RamLog&) = delete; + RamLog& operator=(const RamLog&) = delete; public: class LineIterator; @@ -134,7 +134,8 @@ private: * and so should not be kept around. */ class RamLog::LineIterator { - MONGO_DISALLOW_COPYING(LineIterator); + LineIterator(const LineIterator&) = delete; + LineIterator& operator=(const LineIterator&) = delete; public: explicit LineIterator(RamLog* ramlog); diff --git a/src/mongo/logger/rotatable_file_appender.h b/src/mongo/logger/rotatable_file_appender.h index 5a6ce672c27..72f5a6fae94 100644 --- a/src/mongo/logger/rotatable_file_appender.h +++ b/src/mongo/logger/rotatable_file_appender.h @@ -30,7 +30,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/logger/appender.h" #include "mongo/logger/encoder.h" @@ -44,7 +43,8 @@ namespace logger { */ template <typename Event> class RotatableFileAppender : public Appender<Event> { - MONGO_DISALLOW_COPYING(RotatableFileAppender); + RotatableFileAppender(const RotatableFileAppender&) = delete; + RotatableFileAppender& operator=(const RotatableFileAppender&) = delete; public: typedef Encoder<Event> EventEncoder; diff --git a/src/mongo/logger/rotatable_file_manager.h b/src/mongo/logger/rotatable_file_manager.h index e8bb178310c..79b5f97a7c1 100644 --- a/src/mongo/logger/rotatable_file_manager.h +++ b/src/mongo/logger/rotatable_file_manager.h @@ -33,7 +33,6 @@ #include <utility> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/base/status_with.h" #include "mongo/logger/rotatable_file_writer.h" @@ -50,7 +49,8 @@ typedef StatusWith<RotatableFileWriter*> StatusWithRotatableFileWriter; * Unlike RotatableFileWriter, this type leaves synchronization to its consumers. */ class RotatableFileManager { - MONGO_DISALLOW_COPYING(RotatableFileManager); + RotatableFileManager(const RotatableFileManager&) = delete; + RotatableFileManager& operator=(const RotatableFileManager&) = delete; public: typedef std::pair<std::string, Status> FileNameStatusPair; diff --git a/src/mongo/logger/rotatable_file_writer.cpp b/src/mongo/logger/rotatable_file_writer.cpp index ef864a3c6b2..de59a408d63 100644 --- a/src/mongo/logger/rotatable_file_writer.cpp +++ b/src/mongo/logger/rotatable_file_writer.cpp @@ -84,7 +84,8 @@ std::wstring utf8ToWide(StringData utf8Str) { * (2) Opening files with non-ASCII characters in their names. */ class Win32FileStreambuf : public std::streambuf { - MONGO_DISALLOW_COPYING(Win32FileStreambuf); + Win32FileStreambuf(const Win32FileStreambuf&) = delete; + Win32FileStreambuf& operator=(const Win32FileStreambuf&) = delete; public: Win32FileStreambuf(); @@ -106,7 +107,8 @@ private: * Minimal implementation of a stream to Win32 files. */ class Win32FileOStream : public std::ostream { - MONGO_DISALLOW_COPYING(Win32FileOStream); + Win32FileOStream(const Win32FileOStream&) = delete; + Win32FileOStream& operator=(const Win32FileOStream&) = delete; public: /** diff --git a/src/mongo/logger/rotatable_file_writer.h b/src/mongo/logger/rotatable_file_writer.h index 2cd159b36d2..83fe4716c9a 100644 --- a/src/mongo/logger/rotatable_file_writer.h +++ b/src/mongo/logger/rotatable_file_writer.h @@ -33,7 +33,6 @@ #include <ostream> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/stdx/mutex.h" @@ -53,14 +52,16 @@ namespace logger { * same value for their fileName. */ class RotatableFileWriter { - MONGO_DISALLOW_COPYING(RotatableFileWriter); + RotatableFileWriter(const RotatableFileWriter&) = delete; + RotatableFileWriter& operator=(const RotatableFileWriter&) = delete; public: /** * Guard class representing synchronous use of an instance of RotatableFileWriter. */ class Use { - MONGO_DISALLOW_COPYING(Use); + Use(const Use&) = delete; + Use& operator=(const Use&) = delete; public: /** diff --git a/src/mongo/logger/syslog_appender.h b/src/mongo/logger/syslog_appender.h index b7a8fc47a4b..61cdc329f60 100644 --- a/src/mongo/logger/syslog_appender.h +++ b/src/mongo/logger/syslog_appender.h @@ -34,7 +34,6 @@ #include <sstream> #include <syslog.h> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/logger/appender.h" #include "mongo/logger/encoder.h" @@ -47,7 +46,8 @@ namespace logger { */ template <typename Event> class SyslogAppender : public Appender<Event> { - MONGO_DISALLOW_COPYING(SyslogAppender); + SyslogAppender(const SyslogAppender&) = delete; + SyslogAppender& operator=(const SyslogAppender&) = delete; public: typedef Encoder<Event> EventEncoder; |