summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/controllable.h
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2014-07-27 11:28:23 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2014-07-27 11:28:23 +0100
commit59822e8dd273df9ec80051b4f3be83dfec39c809 (patch)
tree691d179e1656520c536dec5f98ab9fdf55ee6d0e /libs/pbd/pbd/controllable.h
parent576f39d6a0ffe42ffc2c7b5523096e581ed11714 (diff)
Minor change to 'pbd/controllable.h'
(in MSVC, 'min' & 'max' are not in namespace std)
Diffstat (limited to 'libs/pbd/pbd/controllable.h')
-rw-r--r--libs/pbd/pbd/controllable.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h
index fbe10f3841..4260429952 100644
--- a/libs/pbd/pbd/controllable.h
+++ b/libs/pbd/pbd/controllable.h
@@ -30,6 +30,9 @@
#include "pbd/statefuldestructible.h"
+using std::min;
+using std::max;
+
class XMLNode;
namespace PBD {
@@ -72,7 +75,7 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible {
/** Get and Set `interface' value (typically, percent of knob travel) */
virtual float get_interface() const { return (internal_to_interface(get_value())); }
- virtual void set_interface (float percent) { percent = std::min( std::max(0.0f, percent), 1.0f); set_value(interface_to_internal(percent)); }
+ virtual void set_interface (float percent) { percent = min( max(0.0f, percent), 1.0f); set_value(interface_to_internal(percent)); }
/** Get and Set `user' value ( dB or milliseconds, etc. This MIGHT be the same as the internal value, but in a few cases it is not ) */
virtual float get_user() const { return (internal_to_user(get_value())); }