NONE is too generic and can easily conflict with something else.
std::string control;
unsigned device = 0;
- ControlSrcType type = NONE;
+ ControlSrcType type = NO_SOURCE;
unsigned index = 0;
};
return dev->get_axis_name(index)+" +";
else if(type==AXIS_NEG)
return dev->get_axis_name(index)+" -";
- else if(type==NONE)
+ else if(type==NO_SOURCE)
return "None";
return lexical_cast<string>(index);
{
switch(src.type)
{
- case NONE:
+ case NO_SOURCE:
break;
case BUTTON:
src.dev->signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Control::button_press), false));
{
if(capture_dev)
{
- ControlSrcType type = NONE;
+ ControlSrcType type = NO_SOURCE;
if(v<-0.9)
type = AXIS_NEG;
else if(v>0.9)
type = AXIS_POS;
- if(type!=NONE)
+ if(type!=NO_SOURCE)
{
src.dev = capture_dev;
src.type = type;
enum ControlSrcType
{
- NONE,
+ NO_SOURCE,
BUTTON,
AXIS_POS,
AXIS_NEG
struct ControlSource
{
Device *dev = 0;
- ControlSrcType type = NONE;
+ ControlSrcType type = NO_SOURCE;
unsigned index = 0;
ControlSource() = default;