diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-02 10:51:46 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-02 10:51:46 +0100 |
commit | 1e3f6d6da29572426d5fd2fd922af9cc5219b285 (patch) | |
tree | 85a89f35bb78e82ed67eb481b18c2f79acf6b94b /device.c | |
parent | c8808a854b58a6370baba41a8a0de97f1d4f73fd (diff) | |
download | vdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.gz vdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.bz2 |
Replaced min(max()) calls with the new function constrain()
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.53 2012/03/02 10:33:35 kls Exp $ + * $Id: device.c 2.54 2012/03/02 10:46:06 kls Exp $ */ #include "device.h" @@ -877,7 +877,7 @@ void cDevice::SetAudioChannel(int AudioChannel) void cDevice::SetVolume(int Volume, bool Absolute) { int OldVolume = volume; - volume = min(max(Absolute ? Volume : volume + Volume, 0), MAXVOLUME); + volume = constrain(Absolute ? Volume : volume + Volume, 0, MAXVOLUME); SetVolumeDevice(volume); Absolute |= mute; cStatus::MsgSetVolume(Absolute ? volume : volume - OldVolume, Absolute); |