-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Clean up command line arguments processing #1160
Conversation
f593910
to
e680fb8
Compare
This introduces some unavoidable incompatibility due to CLI11 limitations. CLI11 does not support multi-character options with single dash. Previous options like -RH, -HWMON, and -SE can't be implemented as is. The replacement --hwmon options must specify a 0 or a 1. it can no longer we specified alone, implying a 0.
Is it me missing something or we do loose some sanity checks over entered values ? |
@AndreaLanfranchi The check can only occur after the parse, but it is included below. Line 509 in 92604d5
|
Sorry ... I was totally missing that. |
This builds on @chfast's work creating the CLI11 hunter package, making it available for us to use. There is very little left in main.cpp! Should I combine main.cpp and Mineraux.h into a single file. There are no other includes of Mineraux. |
Good idea. |
I was thinking a single main.cpp file. MinerAux.h is only included by main.cpp so it is not the typical header file. It contains mostly executable code and no common (shared) variables. It is strictly for main.cpp's use, so why not just include it as part of main.cpp instead of #including it as a separate file? |
Mine was only a suggestion due to personal habit ... wether there is a class (MinerCLI is) I prefer to have definition into .h and executable code in .cpp |
There is no consistency in that respect in Ethminer. Some seem to prefer .h only formulation with executable code inline, others as you say with separate header and executable components. I'll adapt to whatever style is currently in use. |
Definitely, move code from MinerAux to main.cpp. The MinerAux was shared between eth/main and ethminer/main long time ago. |
Fix broken simulation and benchmark option processing
@jean-m-cyr could you please add in help text the meanings for stratumx+tcp modes ?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me
No description provided.