Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
df278b8b
Commit
df278b8b
authored
Jan 13, 2011
by
Pieter Noordhuis
Browse files
Compiler should decide on inlining
parent
22b9bf15
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
df278b8b
...
@@ -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