MSVC won't allow us to cast directly from float to an enum. We need to kludge it...
authorJohn Emmas <johne53@tiscali.co.uk>
Thu, 22 Mar 2018 10:54:21 +0000 (10:54 +0000)
committerJohn Emmas <johne53@tiscali.co.uk>
Thu, 22 Mar 2018 10:54:21 +0000 (10:54 +0000)
(is it safe to be casting from float to enum anyway??)

libs/surfaces/osc/osc.cc

index ae96774a527663932d77880180f2a83cb57b49f2..7c46f5bf6c14daf727d567466e2dd5e5b15b01b1 100644 (file)
@@ -1378,7 +1378,7 @@ OSC::custom_clear (lo_message msg)
 int
 OSC::custom_mode (float state, lo_message msg)
 {
-       return _custom_mode ((OSCCustomMode) state, get_address (msg));
+       return _custom_mode ((OSCCustomMode) (int)state, get_address (msg));
 }
 
 int