|
16 | 16 | You should have received a copy of the GNU General Public License |
17 | 17 | along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 | */ |
19 | | -/** @file MinerAux.cpp |
20 | | - * @author Gav Wood <i@gavwood.com> |
21 | | - * @date 2014 |
| 19 | +/** @file |
22 | 20 | * CLI module for mining. |
23 | 21 | */ |
24 | 22 |
|
|
29 | 27 | #include <libethashseal/Ethash.h> |
30 | 28 | #include <libethashseal/EthashCPUMiner.h> |
31 | 29 |
|
32 | | -// TODO - having using derivatives in header files is very poor style, and we need to fix these up. |
33 | | -// |
34 | | -// http://stackoverflow.com/questions/4872373/why-is-including-using-namespace-into-a-header-file-a-bad-idea-in-c |
35 | | -// |
36 | | -// "However you'll virtually never see a using directive in a header file (at least not outside of scope). |
37 | | -// The reason is that using directive eliminate the protection of that particular namespace, and the effect last |
38 | | -// until the end of current compilation unit. If you put a using directive (outside of a scope) in a header file, |
39 | | -// it means that this loss of "namespace protection" will occur within any file that include this header, |
40 | | -// which often mean other header files." |
41 | | -// |
42 | | -// Bob has already done just that in https://github.com/bobsummerwill/cpp-ethereum/commits/cmake_fixes/ethminer, |
43 | | -// and we should apply those changes back to 'develop'. It is probably best to defer that cleanup |
44 | | -// until after attempting to backport the Genoil ethminer changes, because they are fairly extensive |
45 | | -// in terms of lines of change, though all the changes are just adding explicit namespace prefixes. |
46 | | -// So let's start with just the subset of changes which minimizes the #include dependencies. |
47 | | -// |
48 | | -// See https://github.com/bobsummerwill/cpp-ethereum/commit/53af845268b91bc6aa1dab53a6eac675157a072b |
49 | | -// See https://github.com/bobsummerwill/cpp-ethereum/commit/3b9e581d7c04c637ebda18d3d86b5a24d29226f4 |
50 | | -// |
51 | | -// More generally, the fact that nearly all of the code for ethminer is actually in the 'MinerAux.h' |
52 | | -// header file, rather than in a source file, is also poor style and should probably be addressed. |
53 | | -// Perhaps there is some historical reason for this which I am unaware of? |
54 | | - |
55 | 30 | using namespace std; |
56 | 31 | using namespace dev; |
57 | 32 | using namespace dev::eth; |
|
0 commit comments