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
590687fd
Commit
590687fd
authored
Sep 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protocol/RangeArg: eliminate SetAll()
parent
993f8d6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
DatabaseCommands.cxx
src/command/DatabaseCommands.cxx
+2
-3
RangeArg.hxx
src/protocol/RangeArg.hxx
+0
-5
No files found.
src/command/DatabaseCommands.cxx
View file @
590687fd
...
...
@@ -74,14 +74,13 @@ ParseSortTag(const char *s)
static
CommandResult
handle_match
(
Client
&
client
,
Request
args
,
Response
&
r
,
bool
fold_case
)
{
RangeArg
window
;
RangeArg
window
=
RangeArg
::
All
()
;
if
(
args
.
size
>=
2
&&
StringIsEqual
(
args
[
args
.
size
-
2
],
"window"
))
{
window
=
args
.
ParseRange
(
args
.
size
-
1
);
args
.
pop_back
();
args
.
pop_back
();
}
else
window
.
SetAll
();
}
TagType
sort
=
TAG_NUM_OF_ITEM_TYPES
;
bool
descending
=
false
;
...
...
src/protocol/RangeArg.hxx
View file @
590687fd
...
...
@@ -27,11 +27,6 @@
struct
RangeArg
{
unsigned
start
,
end
;
void
SetAll
()
{
start
=
0
;
end
=
std
::
numeric_limits
<
unsigned
>::
max
();
}
static
constexpr
RangeArg
All
()
{
return
{
0
,
std
::
numeric_limits
<
unsigned
>::
max
()
};
}
...
...
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