aboutsummaryrefslogtreecommitdiffstats
path: root/pulse.h
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-07-05 15:28:36 -0400
committerDave Reisner <dreisner@archlinux.org>2014-07-05 15:28:36 -0400
commit18b650bbc8468dcb077ec95e2ca50c9e6bc5e599 (patch)
tree8577adfc6bf9da737e1d7c83b3b81af8adba16df /pulse.h
parent83fc61efa19f92244b8e95a1fbd3899c50665920 (diff)
downloadmirror-ponymix-18b650bbc8468dcb077ec95e2ca50c9e6bc5e599.tar.gz
mirror-ponymix-18b650bbc8468dcb077ec95e2ca50c9e6bc5e599.tar.bz2
mirror-ponymix-18b650bbc8468dcb077ec95e2ca50c9e6bc5e599.zip
Make Range::InRange a bool
Diffstat (limited to 'pulse.h')
-rw-r--r--pulse.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/pulse.h b/pulse.h
index 7c17baf..55b07c3 100644
--- a/pulse.h
+++ b/pulse.h
@@ -133,11 +133,9 @@ struct Range {
return value < min ? min : (value > max ? max : value);
}
- // Determine if the passed value is within the range. Returns 0
- // on success, else -1 if lower than the minimum, and 1 if higher
- // than the maximum.
- int InRange(T value) const {
- return value < min ? -1 : (value > max ? 1 : 0);
+ // Determine if the passed value is within the range.
+ bool InRange(T value) const {
+ return value >= min && value <= max;
}
T min;