mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +02:00
fix several warnings
This commit is contained in:
parent
56f625d376
commit
7669f9ed2c
4 changed files with 6 additions and 8 deletions
|
@ -154,7 +154,7 @@ controller::InputController::Pointer ControllerScriptingInterface::createInputCo
|
|||
if (trackerID >= 0) {
|
||||
controller::InputController::Pointer inputController = std::make_shared<InputController>(deviceID, trackerID, this);
|
||||
controller::InputController::Key key = inputController->getKey();
|
||||
_inputControllers.insert(InputControllerMap::value_type(inputController->getKey(), inputController));
|
||||
_inputControllers.insert(InputControllerMap::value_type(key, inputController));
|
||||
return inputController;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,9 +89,9 @@ PulseFilter::FactoryEntryBuilder PulseFilter::_factoryEntryBuilder;
|
|||
|
||||
|
||||
float PulseFilter::apply(float value) const {
|
||||
float result = 0.0;
|
||||
float result = 0.0f;
|
||||
|
||||
if (0.0 != value) {
|
||||
if (0.0f != value) {
|
||||
float now = secTimestampNow();
|
||||
float delta = now - _lastEmitTime;
|
||||
if (delta >= _interval) {
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace controller {
|
|||
: Endpoint(UserInputMapper::Input(UserInputMapper::Input::INVALID_INPUT)), Pair(first, second) { }
|
||||
|
||||
virtual float value() {
|
||||
float result = first->value() * -1.0 + second->value();
|
||||
float result = first->value() * -1.0f + second->value();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,6 @@ namespace controller {
|
|||
float value = getValue(source);
|
||||
|
||||
// Apply each of the filters.
|
||||
const auto& filters = route->_filters;
|
||||
for (const auto& filter : route->_filters) {
|
||||
value = filter->apply(value);
|
||||
}
|
||||
|
@ -406,7 +405,7 @@ namespace controller {
|
|||
}
|
||||
|
||||
bool ScriptingInterface::isButtonPressed(int buttonIndex) const {
|
||||
return getButtonValue((StandardButtonChannel)buttonIndex) == 0.0 ? false : true;
|
||||
return getButtonValue((StandardButtonChannel)buttonIndex) == 0.0f ? false : true;
|
||||
}
|
||||
|
||||
int ScriptingInterface::getNumberOfTriggers() const {
|
||||
|
|
|
@ -52,10 +52,9 @@ class RouteBuilderProxy : public QObject {
|
|||
void to(const Endpoint::Pointer& destination);
|
||||
void addFilter(Filter::Lambda lambda);
|
||||
void addFilter(Filter::Pointer filter);
|
||||
ScriptingInterface& _parent;
|
||||
Mapping::Pointer _mapping;
|
||||
Route::Pointer _route;
|
||||
|
||||
ScriptingInterface& _parent;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue