Minor changes to debug_log_writer

- Removed unused m_first data member.
- Explicitly delete copy constructor and assignment operator.
- Removed unused included headers.
This commit is contained in:
Eduardo Arias 2024-04-23 12:57:28 -03:00
parent 373633ffe2
commit 91a736692a
2 changed files with 3 additions and 25 deletions

View File

@ -15,18 +15,6 @@
#include "src/debug_log/debug_log_writer.h"
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fstream>
#include "src/utils/shared_files.h"
namespace modsecurity {

View File

@ -13,15 +13,7 @@
*
*/
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <iostream>
#include <map>
#include <string>
#include <cstring>
#ifndef SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_
@ -45,7 +37,7 @@ class DebugLogWriter {
static int open(const std::string& m_fileName, std::string *error);
private:
DebugLogWriter() : m_first(NULL) { }
DebugLogWriter() { }
~DebugLogWriter() { }
// C++ 03
@ -53,10 +45,8 @@ class DebugLogWriter {
// Dont forget to declare these two. You want to make sure they
// are unacceptable otherwise you may accidentally get copies of
// your singleton appearing.
DebugLogWriter(DebugLogWriter const&);
void operator=(DebugLogWriter const&);
struct debug_log_file_handler *m_first;
DebugLogWriter(DebugLogWriter const&) = delete;
void operator=(DebugLogWriter const&) = delete;
};