Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
b9e7115d
Commit
b9e7115d
authored
Feb 09, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix -h, --long-help, etc.
parent
792f39c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+4
-4
libcaf_core/test/config_option_set.cpp
libcaf_core/test/config_option_set.cpp
+0
-1
No files found.
libcaf_core/src/actor_system_config.cpp
View file @
b9e7115d
...
@@ -254,16 +254,16 @@ error actor_system_config::parse(string_list args, std::istream& ini) {
...
@@ -254,16 +254,16 @@ error actor_system_config::parse(string_list args, std::istream& ini) {
remainder
.
insert
(
remainder
.
end
(),
make_move_iterator
(
first
),
remainder
.
insert
(
remainder
.
end
(),
make_move_iterator
(
first
),
make_move_iterator
(
args
.
end
()));
make_move_iterator
(
args
.
end
()));
}
else
{
}
else
{
cli_helptext_printed
=
get_or
(
content
,
"
global.
help"
,
false
)
cli_helptext_printed
=
get_or
(
content
,
"help"
,
false
)
||
get_or
(
content
,
"
global.
long-help"
,
false
);
||
get_or
(
content
,
"long-help"
,
false
);
}
}
// Generate help text if needed.
// Generate help text if needed.
if
(
cli_helptext_printed
)
{
if
(
cli_helptext_printed
)
{
bool
long_help
=
get_or
(
content
,
"
global.
long-help"
,
false
);
bool
long_help
=
get_or
(
content
,
"long-help"
,
false
);
std
::
cout
<<
custom_options_
.
help_text
(
!
long_help
)
<<
std
::
endl
;
std
::
cout
<<
custom_options_
.
help_text
(
!
long_help
)
<<
std
::
endl
;
}
}
// Generate INI dump if needed.
// Generate INI dump if needed.
if
(
!
cli_helptext_printed
&&
get_or
(
content
,
"
global.
dump-config"
,
false
))
{
if
(
!
cli_helptext_printed
&&
get_or
(
content
,
"dump-config"
,
false
))
{
for
(
auto
&
category
:
content
)
{
for
(
auto
&
category
:
content
)
{
if
(
auto
dict
=
get_if
<
config_value
::
dictionary
>
(
&
category
.
second
))
{
if
(
auto
dict
=
get_if
<
config_value
::
dictionary
>
(
&
category
.
second
))
{
std
::
cout
<<
'['
<<
category
.
first
<<
"]
\n
"
;
std
::
cout
<<
'['
<<
category
.
first
<<
"]
\n
"
;
...
...
libcaf_core/test/config_option_set.cpp
View file @
b9e7115d
...
@@ -62,7 +62,6 @@ CAF_TEST(lookup) {
...
@@ -62,7 +62,6 @@ CAF_TEST(lookup) {
CAF_CHECK_EQUAL
(
opts
.
size
(),
3u
);
CAF_CHECK_EQUAL
(
opts
.
size
(),
3u
);
CAF_MESSAGE
(
"lookup by long name"
);
CAF_MESSAGE
(
"lookup by long name"
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"opt1"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"opt1"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"global.opt1"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"test.opt2"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"test.opt2"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"test.flag"
),
nullptr
);
CAF_CHECK_NOT_EQUAL
(
opts
.
cli_long_name_lookup
(
"test.flag"
),
nullptr
);
CAF_MESSAGE
(
"lookup by short name"
);
CAF_MESSAGE
(
"lookup by short name"
);
...
...
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