Skip to content

Commit dcb5eae

Browse files
committed
Make sure used std includes are the system ones and called in the right order
1 parent ec087f4 commit dcb5eae

4 files changed

Lines changed: 22 additions & 23 deletions

File tree

include/Logger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
#include "implementation/LoggerParameters.h"
1313
#include "implementation/LoggerUtils.h"
1414

15-
#include <string>
1615
#include <mutex>
16+
#include <string>
1717
#include <vector>
18+
#include <sstream>
1819
#include <unordered_set>
19-
#include "sstream"
2020

2121

2222
// Here is what you want to use

include/implementation/Logger.impl.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@
99

1010
#include "LoggerParameters.h"
1111

12-
#include <cstdarg>
13-
#include <cstdio>
12+
#include <map>
13+
#include <mutex>
14+
#include <cmath> // std::abs
1415
#include <ctime>
16+
#include <cstdio>
17+
#include <memory> // For std::unique_ptr
1518
#include <string>
16-
#include <utility>
1719
#include <vector>
1820
#include <thread>
19-
#include <map>
20-
#include <mutex>
21-
#include <type_traits>
21+
#include <cstdio>
22+
#include <cstdarg>
23+
#include <utility>
2224
#include <sstream>
23-
#include <iostream>
2425
#include <iomanip>
25-
#include <algorithm>
26-
#include <memory> // For std::unique_ptr
27-
#include <cmath> // std::abs
28-
#include <cstdio>
2926
#include <iostream>
27+
#include <algorithm>
28+
#include <type_traits>
3029

3130

3231
#define LoggerInitializerImpl( lambdaInit ) \

include/implementation/LoggerUtils.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#ifndef SIMPLE_CPP_LOGGER_LOGGERUTILS_H
66
#define SIMPLE_CPP_LOGGER_LOGGERUTILS_H
77

8-
#include <iostream>
8+
#include <thread>
9+
#include <vector>
10+
#include <string>
911
#include <fstream>
10-
#include "thread"
11-
#include "vector"
12-
#include "string"
13-
#include "functional"
12+
#include <iostream>
13+
#include <functional>
1414

1515

1616
#ifndef HAS_CPP_17

include/implementation/LoggerUtils.impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
#ifndef SIMPLE_CPP_LOGGER_LOGGERUTILS_IMPL_H
66
#define SIMPLE_CPP_LOGGER_LOGGERUTILS_IMPL_H
77

8-
#include <iostream>
9-
#include <fstream>
8+
#include <cmath>
9+
#include <vector>
1010
#include <string>
11-
#include <algorithm>
1211
#include <memory>
1312
#include <cstring> // strrchr
14-
#include "cmath"
15-
#include "vector"
13+
#include <fstream>
14+
#include <iostream>
15+
#include <algorithm>
1616

1717
#if defined(_WIN32)
1818
// Windows

0 commit comments

Comments
 (0)