Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
30b7e786
Commit
30b7e786
authored
Jun 21, 2022
by
Paul
Browse files
Format
parent
6cfe98a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
src/driver/argument_parser.hpp
src/driver/argument_parser.hpp
+3
-5
src/driver/main.cpp
src/driver/main.cpp
+5
-3
No files found.
src/driver/argument_parser.hpp
View file @
30b7e786
...
...
@@ -377,12 +377,10 @@ struct argument_parser
};
}
template
<
class
T
>
template
<
class
T
>
void
set_exe_name_to
(
T
&
x
)
{
actions
.
push_back
([
&
](
auto
&
self
)
{
x
=
self
.
exe_name
;
});
actions
.
push_back
([
&
](
auto
&
self
)
{
x
=
self
.
exe_name
;
});
}
bool
...
...
@@ -449,7 +447,7 @@ struct argument_parser
}
}
}
for
(
auto
&&
action
:
actions
)
for
(
auto
&&
action
:
actions
)
action
(
*
this
);
return
false
;
}
...
...
src/driver/main.cpp
View file @
30b7e786
...
...
@@ -591,14 +591,16 @@ struct main_command
auto
it
=
std
::
find_if
(
wrong_commands
.
begin
(),
wrong_commands
.
end
(),
[](
const
auto
&
c
)
{
return
get_commands
().
count
(
c
)
>
0
;
});
if
(
it
==
wrong_commands
.
end
())
if
(
it
==
wrong_commands
.
end
())
{
std
::
cout
<<
"'"
<<
color
::
fg_yellow
<<
wrong_commands
.
front
()
<<
color
::
reset
<<
"' is not a valid command."
<<
std
::
endl
;
std
::
cout
<<
"'"
<<
color
::
fg_yellow
<<
wrong_commands
.
front
()
<<
color
::
reset
<<
"' is not a valid command."
<<
std
::
endl
;
std
::
cout
<<
get_command_help
(
"Available commands:"
)
<<
std
::
endl
;
}
else
{
std
::
cout
<<
"command '"
<<
color
::
fg_yellow
<<
*
it
<<
color
::
reset
<<
"' must be first argument"
<<
std
::
endl
;
std
::
cout
<<
"command '"
<<
color
::
fg_yellow
<<
*
it
<<
color
::
reset
<<
"' must be first argument"
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
color
::
fg_yellow
<<
"USAGE:"
<<
color
::
reset
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment