Use early exit for --help and --version options.
This commit is contained in:
parent
14e7c82512
commit
70d6e0e62c
12 changed files with 282 additions and 151 deletions
|
@ -23,13 +23,20 @@
|
|||
*/
|
||||
|
||||
#include "App.h"
|
||||
#include "base/kernel/Entry.h"
|
||||
#include "base/kernel/Process.h"
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
xmrig::Process process(argc, argv);
|
||||
using namespace xmrig;
|
||||
|
||||
xmrig::App app(&process);
|
||||
Process process(argc, argv);
|
||||
const Entry::Id entry = Entry::get(process);
|
||||
if (entry) {
|
||||
return Entry::exec(process, entry);
|
||||
}
|
||||
|
||||
App app(&process);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue