Skip to content

Commit 91a7366

Browse files
committed
Minor changes to debug_log_writer
- Removed unused m_first data member. - Explicitly delete copy constructor and assignment operator. - Removed unused included headers.
1 parent 373633f commit 91a7366

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

src/debug_log/debug_log_writer.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@
1515

1616
#include "src/debug_log/debug_log_writer.h"
1717

18-
#include <errno.h>
19-
#include <fcntl.h>
20-
#include <pthread.h>
21-
#include <stdio.h>
22-
#include <sys/ipc.h>
23-
#include <sys/shm.h>
24-
#include <sys/stat.h>
25-
#include <sys/types.h>
26-
#include <unistd.h>
27-
28-
#include <fstream>
29-
3018
#include "src/utils/shared_files.h"
3119

3220
namespace modsecurity {

src/debug_log/debug_log_writer.h

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@
1313
*
1414
*/
1515

16-
#include <stdio.h>
17-
#include <sys/ipc.h>
18-
#include <sys/shm.h>
19-
#include <sys/types.h>
20-
21-
#include <iostream>
22-
#include <map>
2316
#include <string>
24-
#include <cstring>
2517

2618

2719
#ifndef SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_
@@ -45,18 +37,16 @@ class DebugLogWriter {
4537
static int open(const std::string& m_fileName, std::string *error);
4638

4739
private:
48-
DebugLogWriter() : m_first(NULL) { }
40+
DebugLogWriter() { }
4941
~DebugLogWriter() { }
5042

5143
// C++ 03
5244
// ========
5345
// Dont forget to declare these two. You want to make sure they
5446
// are unacceptable otherwise you may accidentally get copies of
5547
// your singleton appearing.
56-
DebugLogWriter(DebugLogWriter const&);
57-
void operator=(DebugLogWriter const&);
58-
59-
struct debug_log_file_handler *m_first;
48+
DebugLogWriter(DebugLogWriter const&) = delete;
49+
void operator=(DebugLogWriter const&) = delete;
6050
};
6151

6252

0 commit comments

Comments
 (0)