Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2142d070
Commit
2142d070
authored
Apr 03, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/Process: refactor `return` statements
parent
9711cee2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Process.cxx
src/client/Process.cxx
+10
-10
No files found.
src/client/Process.cxx
View file @
2142d070
...
...
@@ -65,8 +65,6 @@ Client::ProcessLine(char *line) noexcept
return
CommandResult
::
CLOSE
;
}
CommandResult
ret
;
if
(
StringIsEqual
(
line
,
"noidle"
))
{
if
(
idle_waiting
)
{
/* send empty idle response and leave idle mode */
...
...
@@ -96,8 +94,8 @@ Client::ProcessLine(char *line) noexcept
auto
&&
list
=
cmd_list
.
Commit
();
ret
=
ProcessCommandList
(
cmd_list
.
IsOKMode
(),
std
::
move
(
list
));
auto
ret
=
ProcessCommandList
(
cmd_list
.
IsOKMode
(),
std
::
move
(
list
));
FormatDebug
(
client_domain
,
"[%u] process command "
"list returned %i"
,
num
,
int
(
ret
));
...
...
@@ -110,6 +108,8 @@ Client::ProcessLine(char *line) noexcept
command_success
(
*
this
);
cmd_list
.
Reset
();
return
ret
;
}
else
{
if
(
!
cmd_list
.
Add
(
line
))
{
FormatWarning
(
client_domain
,
...
...
@@ -120,20 +120,20 @@ Client::ProcessLine(char *line) noexcept
return
CommandResult
::
CLOSE
;
}
ret
=
CommandResult
::
OK
;
ret
urn
CommandResult
::
OK
;
}
}
else
{
if
(
StringIsEqual
(
line
,
CLIENT_LIST_MODE_BEGIN
))
{
cmd_list
.
Begin
(
false
);
ret
=
CommandResult
::
OK
;
ret
urn
CommandResult
::
OK
;
}
else
if
(
StringIsEqual
(
line
,
CLIENT_LIST_OK_MODE_BEGIN
))
{
cmd_list
.
Begin
(
true
);
ret
=
CommandResult
::
OK
;
ret
urn
CommandResult
::
OK
;
}
else
{
FormatDebug
(
client_domain
,
"[%u] process command
\"
%s
\"
"
,
num
,
line
);
ret
=
command_process
(
*
this
,
0
,
line
);
auto
ret
=
command_process
(
*
this
,
0
,
line
);
FormatDebug
(
client_domain
,
"[%u] command returned %i"
,
num
,
int
(
ret
));
...
...
@@ -143,8 +143,8 @@ Client::ProcessLine(char *line) noexcept
if
(
ret
==
CommandResult
::
OK
)
command_success
(
*
this
);
return
ret
;
}
}
return
ret
;
}
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