Browse Source

[2726] Make some things noncopyable

We don't copy them and the implicit copy constructor would be wrong. So
silence the cppcheck and make sure nobody copies by accident.
Michal 'vorner' Vaner 12 years ago
parent
commit
b037963e65
2 changed files with 5 additions and 2 deletions
  1. 2 1
      src/lib/log/logger_impl.h
  2. 3 1
      src/lib/log/logger_manager.h

+ 2 - 1
src/lib/log/logger_impl.h

@@ -23,6 +23,7 @@
 #include <string>
 #include <map>
 #include <utility>
+#include <boost/noncopyable.hpp>
 
 
 // log4cplus logger header file
@@ -61,7 +62,7 @@ namespace log {
 /// b) The idea of debug levels is implemented.  See logger_level.h and
 /// logger_level_impl.h for more details on this.
 
-class LoggerImpl {
+class LoggerImpl : public boost::noncopyable {
 public:
 
     /// \brief Constructor

+ 3 - 1
src/lib/log/logger_manager.h

@@ -19,6 +19,8 @@
 #include <util/threads/sync.h>
 #include <log/logger_specification.h>
 
+#include <boost/noncopyable.hpp>
+
 // Generated if, when updating the logging specification, an unknown
 // destination is encountered.
 class UnknownLoggingDestination : public isc::Exception {
@@ -41,7 +43,7 @@ class LoggerManagerImpl;
 /// To isolate the underlying implementation from basic processing, the
 /// LoggerManager is implemented using the "pimpl" idiom.
 
-class LoggerManager {
+class LoggerManager : public boost::noncopyable {
 public:
     /// \brief Constructor
     LoggerManager();