Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
5607c101
Commit
5607c101
authored
Sep 23, 2020
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Little code simplification for conf_filename
parent
0bb4f144
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/main.cpp
src/main.cpp
+4
-4
No files found.
src/main.cpp
View file @
5607c101
...
...
@@ -194,7 +194,7 @@ static int main_loop(std::string hostname, std::string password)
int
main
(
int
ac
,
char
**
av
)
{
std
::
string
c
li_conf_filename
;
std
::
string
c
onf_filename
{}
;
bool
test_conf
=
false
;
if
(
ac
>
1
)
{
...
...
@@ -206,7 +206,7 @@ int main(int ac, char** av)
else
if
((
arg
==
"-t"
)
||
(
arg
==
"--test-config"
))
test_conf
=
true
;
else
if
(
i
+
1
==
ac
)
c
li_c
onf_filename
=
arg
;
conf_filename
=
arg
;
else
{
std
::
cerr
<<
"Unknow command line option: "
<<
arg
...
...
@@ -215,8 +215,8 @@ int main(int ac, char** av)
}
}
}
const
std
::
string
conf_filename
=
cli_conf_filename
.
empty
()
?
xdg_config_path
(
"biboumi.cfg"
)
:
cli_conf_filename
;
if
(
conf_filename
.
empty
())
conf_filename
=
xdg_config_path
(
"biboumi.cfg"
)
;
std
::
cout
<<
"Using configuration file: "
<<
conf_filename
<<
std
::
endl
;
if
(
!
Config
::
read_conf
(
conf_filename
))
...
...
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