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
ruanhaishen
redis
Commits
1b2b8cbb
You need to sign in or sign up before continuing.
Commit
1b2b8cbb
authored
Jan 13, 2011
by
Pieter Noordhuis
Browse files
Compiler should decide on inlining
parent
4769dc78
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
1b2b8cbb
...
@@ -180,15 +180,15 @@ typedef struct {
...
@@ -180,15 +180,15 @@ typedef struct {
int
minex
,
maxex
;
/* are min or max exclusive? */
int
minex
,
maxex
;
/* are min or max exclusive? */
}
zrangespec
;
}
zrangespec
;
static
inline
int
zslValueInMinRange
(
double
value
,
zrangespec
*
spec
)
{
static
int
zslValueInMinRange
(
double
value
,
zrangespec
*
spec
)
{
return
spec
->
minex
?
(
value
>
spec
->
min
)
:
(
value
>=
spec
->
min
);
return
spec
->
minex
?
(
value
>
spec
->
min
)
:
(
value
>=
spec
->
min
);
}
}
static
inline
int
zslValueInMaxRange
(
double
value
,
zrangespec
*
spec
)
{
static
int
zslValueInMaxRange
(
double
value
,
zrangespec
*
spec
)
{
return
spec
->
maxex
?
(
value
<
spec
->
max
)
:
(
value
<=
spec
->
max
);
return
spec
->
maxex
?
(
value
<
spec
->
max
)
:
(
value
<=
spec
->
max
);
}
}
static
inline
int
zslValueInRange
(
double
value
,
zrangespec
*
spec
)
{
static
int
zslValueInRange
(
double
value
,
zrangespec
*
spec
)
{
return
zslValueInMinRange
(
value
,
spec
)
&&
zslValueInMaxRange
(
value
,
spec
);
return
zslValueInMinRange
(
value
,
spec
)
&&
zslValueInMaxRange
(
value
,
spec
);
}
}
...
...
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