Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit c3c45b0

Browse files
committedAug 11, 2018
Rearrange includes
- group and separate #includes such that clang-format doesn't sort them.
1 parent 2eaff64 commit c3c45b0

38 files changed

+132
-94
lines changed
 

‎ethminer/main.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
#include <ethminer/buildinfo.h>
19-
2018
#include <CLI/CLI.hpp>
2119

20+
#include <ethminer/buildinfo.h>
21+
#if ETH_DBUS
22+
#include <ethminer/DBusInt.h>
23+
#endif
24+
2225
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
2326
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
2427
#endif
@@ -52,10 +55,6 @@ struct MiningChannel : public LogChannel
5255

5356
#define minelog clog(MiningChannel)
5457

55-
#if ETH_DBUS
56-
#include <ethminer/DBusInt.h>
57-
#endif
58-
5958
bool g_running = false;
6059

6160
class MinerCLI

‎libapicore/ApiServer.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#pragma once
22

3+
#include <boost/asio.hpp>
4+
#include <boost/bind.hpp>
5+
#include <boost/shared_ptr.hpp>
6+
37
#include <json/json.h>
8+
49
#include <libethcore/Farm.h>
510
#include <libethcore/Miner.h>
611
#include <libpoolprotocols/PoolManager.h>
7-
#include <boost/asio.hpp>
8-
#include <boost/bind.hpp>
9-
#include <boost/shared_ptr.hpp>
1012

1113
using namespace dev;
1214
using namespace dev::eth;

‎libapicore/httpServer.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
#include "httpServer.h"
2-
#include "libdevcore/Common.h"
3-
#include "libdevcore/Log.h"
4-
5-
#include <ethminer/buildinfo.h>
6-
7-
#include <mongoose/mongoose.h>
8-
91
#include <limits.h>
102
#include <chrono>
113
#include <thread>
124

5+
#include <mongoose/mongoose.h>
6+
7+
#include "ethminer/buildinfo.h"
8+
#include "httpServer.h"
9+
#include "libdevcore/Common.h"
10+
#include "libdevcore/Log.h"
1311

1412
#ifndef HOST_NAME_MAX
1513
#define HOST_NAME_MAX 255

‎libapicore/httpServer.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#pragma once
22

3-
#include <libethcore/Farm.h>
43
#include <thread>
54

5+
#include <libethcore/Farm.h>
6+
67
class httpServer
78
{
89
public:

‎libdevcore/Common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
#include "vector_ref.h"
1111

12-
#include <boost/multiprecision/cpp_int.hpp>
13-
1412
#include <string>
1513
#include <vector>
1614

15+
#include <boost/multiprecision/cpp_int.hpp>
16+
1717
using byte = uint8_t;
1818

1919
namespace dev

‎libdevcore/CommonData.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
* @date 2014
2020
*/
2121

22+
#include <cstdlib>
23+
2224
#include "CommonData.h"
2325
#include "Exceptions.h"
24-
#include <cstdlib>
2526

2627
using namespace std;
2728
using namespace dev;

‎libdevcore/CommonData.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323

2424
#pragma once
2525

26-
#include "Common.h"
2726
#include <algorithm>
2827
#include <cstring>
2928
#include <string>
3029
#include <type_traits>
3130
#include <unordered_set>
3231
#include <vector>
3332

33+
#include "Common.h"
34+
3435
namespace dev
3536
{
3637
// String conversion functions, mainly to/from hex/nibble/byte representations.

‎libdevcore/Exceptions.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121

2222
#pragma once
2323

24-
#include "CommonData.h"
25-
#include "FixedHash.h"
26-
#include <boost/exception/all.hpp>
27-
#include <boost/throw_exception.hpp>
2824
#include <exception>
2925
#include <string>
3026

27+
#include <boost/exception/all.hpp>
28+
#include <boost/throw_exception.hpp>
29+
30+
#include "CommonData.h"
31+
#include "FixedHash.h"
32+
3133
namespace dev
3234
{
3335
/// Base class for all exceptions.

‎libdevcore/FixedHash.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
* @date 2014
2020
*/
2121

22-
#include "FixedHash.h"
2322
#include <boost/algorithm/string.hpp>
2423

24+
#include "FixedHash.h"
25+
2526
using namespace std;
2627
using namespace dev;
2728

28-
std::random_device dev::s_fixedHashEngine;
29+
std::random_device dev::s_fixedHashEngine;

‎libdevcore/FixedHash.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323

2424
#pragma once
2525

26-
#include "CommonData.h"
2726
#include <algorithm>
2827
#include <array>
2928
#include <cstdint>
3029
#include <random>
3130

31+
#include "CommonData.h"
32+
3233
namespace dev
3334
{
3435
extern std::random_device s_fixedHashEngine;

‎libdevcore/Log.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
#ifdef __APPLE__
2424
#include <pthread.h>
2525
#endif
26+
2627
#include "Guards.h"
28+
2729
using namespace std;
2830
using namespace dev;
2931

‎libdevcore/Log.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323

2424
#pragma once
2525

26+
#include <chrono>
27+
#include <ctime>
28+
2629
#include "Common.h"
2730
#include "CommonData.h"
2831
#include "FixedHash.h"
2932
#include "Terminal.h"
3033
#include "vector_ref.h"
31-
#include <chrono>
32-
#include <ctime>
3334

3435
/// The logging system's current verbosity.
3536
extern int g_logVerbosity;

‎libdevcore/RLP.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "RLP.h"
23+
2324
using namespace std;
2425
using namespace dev;
2526

@@ -345,4 +346,4 @@ void RLPStream::pushCount(size_t _count, byte _base)
345346
BOOST_THROW_EXCEPTION(RLPException() << errinfo_comment("Count too large for RLP"));
346347
m_out.push_back((byte)(br + _base)); // max 8 bytes.
347348
pushInt(_count, br);
348-
}
349+
}

‎libdevcore/RLP.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323

2424
#pragma once
2525

26-
#include "Common.h"
27-
#include "Exceptions.h"
28-
#include "FixedHash.h"
29-
#include "vector_ref.h"
3026
#include <array>
3127
#include <exception>
3228
#include <iomanip>
3329
#include <iostream>
3430
#include <vector>
3531

32+
#include "Common.h"
33+
#include "Exceptions.h"
34+
#include "FixedHash.h"
35+
#include "vector_ref.h"
36+
3637
namespace dev
3738
{
3839
class RLP;

‎libdevcore/Worker.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
* @date 2014
2020
*/
2121

22-
#include "Worker.h"
23-
24-
#include "Log.h"
2522
#include <chrono>
2623
#include <thread>
24+
25+
#include "Log.h"
26+
#include "Worker.h"
27+
2728
using namespace std;
2829
using namespace dev;
2930

‎libdevcore/Worker.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121

2222
#pragma once
2323

24-
#include "Guards.h"
2524
#include <atomic>
2625
#include <cassert>
2726
#include <string>
2827
#include <thread>
2928

29+
#include "Guards.h"
30+
3031
namespace dev
3132
{
3233
enum class WorkerState

‎libethash-cl/CLMiner.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
/// @file
44
/// @copyright GNU General Public License
55

6-
#include "CLMiner.h"
7-
#include "ethash.h"
8-
96
#include <boost/dll.hpp>
7+
108
#include <ethash/ethash.hpp>
119

10+
#include "CLMiner.h"
11+
#include "ethash.h"
12+
1213
using namespace dev;
1314
using namespace eth;
1415

‎libethash-cl/CLMiner.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55

66
#pragma once
77

8+
#include <fstream>
9+
810
#include <libdevcore/Worker.h>
911
#include <libethcore/EthashAux.h>
1012
#include <libethcore/Miner.h>
11-
#include <fstream>
1213

1314
#pragma GCC diagnostic push
1415
#if __GNUC__ >= 6

‎libethash-cuda/CUDAMiner.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License
1515
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
#include "CUDAMiner.h"
19-
2018
#include <ethash/ethash.hpp>
2119

20+
#include "CUDAMiner.h"
21+
2222
using namespace std;
2323
using namespace dev;
2424
using namespace eth;

‎libethash-cuda/ethash_cuda_miner_kernel.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#pragma once
22

3-
#include <cuda_runtime.h>
43
#include <stdint.h>
54
#include <sstream>
65
#include <stdexcept>
76
#include <string>
87

8+
#include <cuda_runtime.h>
9+
910
// It is virtually impossible to get more than
1011
// one solution per stream hash calculation
1112
// Leave room for up to 4 results. A power

‎libethcore/BlockHeader.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
#pragma once
66

7-
#include "Exceptions.h"
8-
97
#include <libdevcore/Common.h>
108
#include <libdevcore/RLP.h>
119

10+
#include "Exceptions.h"
11+
1212
namespace dev
1313
{
1414
namespace eth

‎libethcore/EthashAux.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717

1818
#pragma once
1919

20-
#include "BlockHeader.h"
21-
2220
#include <libdevcore/Worker.h>
23-
2421
#include <ethash/ethash.hpp>
2522

23+
#include "BlockHeader.h"
24+
2625
namespace dev
2726
{
2827
namespace eth

‎libethcore/Farm.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,21 @@
2121

2222
#pragma once
2323

24+
#include <atomic>
25+
#include <list>
26+
#include <thread>
27+
28+
#include <boost/asio.hpp>
29+
#include <boost/bind.hpp>
30+
2431
#include <json/json.h>
32+
2533
#include <libdevcore/Common.h>
2634
#include <libdevcore/Worker.h>
2735
#include <libethcore/BlockHeader.h>
2836
#include <libethcore/Miner.h>
2937
#include <libhwmon/wrapadl.h>
3038
#include <libhwmon/wrapnvml.h>
31-
#include <boost/asio.hpp>
32-
#include <boost/bind.hpp>
33-
#include <atomic>
34-
#include <list>
35-
#include <thread>
3639
#if defined(__linux)
3740
#include <libhwmon/wrapamdsysfs.h>
3841
#endif

0 commit comments

Comments
 (0)
This repository has been archived.