Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit 9769f54

Browse files
committed
Cleanup MinerAux.h
1 parent 71630e6 commit 9769f54

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

aleth/MinerAux.h

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
You should have received a copy of the GNU General Public License
1717
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19-
/** @file MinerAux.cpp
20-
* @author Gav Wood <i@gavwood.com>
21-
* @date 2014
19+
/** @file
2220
* CLI module for mining.
2321
*/
2422

@@ -29,29 +27,6 @@
2927
#include <libethashseal/Ethash.h>
3028
#include <libethashseal/EthashCPUMiner.h>
3129

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-
5530
using namespace std;
5631
using namespace dev;
5732
using namespace dev::eth;

0 commit comments

Comments
 (0)