} else {
if (jaxis.value < -dead_zone)
set_joy_controls(left->second, true);
- else if (jaxis.value > dead_zone)
- set_joy_controls(left->second, false);
else
set_joy_controls(left->second, false);
}
if(right == joy_axis_map.end()) {
// std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl;
} else {
- if (jaxis.value < -dead_zone)
- set_joy_controls(right->second, false);
- else if (jaxis.value > dead_zone)
+ if (jaxis.value > dead_zone)
set_joy_controls(right->second, true);
else
set_joy_controls(right->second, false);
sq_pop(vm, 1); // remove table
// depending on number of hits, show matches or autocomplete
- if (cmds.size() == 0) addLines("No known command starts with \""+prefix+"\"");
+ if (cmds.empty()) addLines("No known command starts with \""+prefix+"\"");
if (cmds.size() == 1) {
// one match: just replace input buffer with full command
std::string replaceWith = cmds.front();
{
case ' ':
return Resources::small_font;
- break;
case '-':
return Resources::big_font;
- break;
case '\t':
case '*':
case '#':
case '!':
return Resources::normal_font;
- break;
default:
return Resources::normal_font;
- log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
- break;
+ //log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
}
}
{
case ' ':
return TextScroller::small_color;
- break;
case '-':
return TextScroller::heading_color;
- break;
case '*':
return TextScroller::reference_color;
case '\t':
case '#':
case '!':
return TextScroller::normal_color;
- break;
default:
return Color(0,0,0);
- log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
- break;
+ //log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
}
}
{
case ' ':
return InfoBoxLine::SMALL;
- break;
+
case '\t':
return InfoBoxLine::NORMAL;
- break;
case '-':
return InfoBoxLine::HEADING;
- break;
case '*':
return InfoBoxLine::REFERENCE;
- break;
case '#':
return InfoBoxLine::NORMAL_LEFT;
- break;
case '!':
return InfoBoxLine::IMAGE;
- break;
default:
return InfoBoxLine::SMALL;
- log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
- break;
+ //log_warning << "Unknown format_char: '" << format_char << "'" << std::endl;
}
}
float fps = 10;
reader.get("fps", fps);
- if (width <= 0)
+ if (width == 0)
{
throw std::runtime_error("Width is zero.");
}
- else if (height <= 0)
+ else if (height == 0)
{
throw std::runtime_error("Height is zero.");
}