mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +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) {
|
if (trackerID >= 0) {
|
||||||
controller::InputController::Pointer inputController = std::make_shared<InputController>(deviceID, trackerID, this);
|
controller::InputController::Pointer inputController = std::make_shared<InputController>(deviceID, trackerID, this);
|
||||||
controller::InputController::Key key = inputController->getKey();
|
controller::InputController::Key key = inputController->getKey();
|
||||||
_inputControllers.insert(InputControllerMap::value_type(inputController->getKey(), inputController));
|
_inputControllers.insert(InputControllerMap::value_type(key, inputController));
|
||||||
return inputController;
|
return inputController;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,9 +89,9 @@ PulseFilter::FactoryEntryBuilder PulseFilter::_factoryEntryBuilder;
|
||||||
|
|
||||||
|
|
||||||
float PulseFilter::apply(float value) const {
|
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 now = secTimestampNow();
|
||||||
float delta = now - _lastEmitTime;
|
float delta = now - _lastEmitTime;
|
||||||
if (delta >= _interval) {
|
if (delta >= _interval) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace controller {
|
||||||
: Endpoint(UserInputMapper::Input(UserInputMapper::Input::INVALID_INPUT)), Pair(first, second) { }
|
: Endpoint(UserInputMapper::Input(UserInputMapper::Input::INVALID_INPUT)), Pair(first, second) { }
|
||||||
|
|
||||||
virtual float value() {
|
virtual float value() {
|
||||||
float result = first->value() * -1.0 + second->value();
|
float result = first->value() * -1.0f + second->value();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,7 +324,6 @@ namespace controller {
|
||||||
float value = getValue(source);
|
float value = getValue(source);
|
||||||
|
|
||||||
// Apply each of the filters.
|
// Apply each of the filters.
|
||||||
const auto& filters = route->_filters;
|
|
||||||
for (const auto& filter : route->_filters) {
|
for (const auto& filter : route->_filters) {
|
||||||
value = filter->apply(value);
|
value = filter->apply(value);
|
||||||
}
|
}
|
||||||
|
@ -406,7 +405,7 @@ namespace controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScriptingInterface::isButtonPressed(int buttonIndex) const {
|
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 {
|
int ScriptingInterface::getNumberOfTriggers() const {
|
||||||
|
|
|
@ -52,10 +52,9 @@ class RouteBuilderProxy : public QObject {
|
||||||
void to(const Endpoint::Pointer& destination);
|
void to(const Endpoint::Pointer& destination);
|
||||||
void addFilter(Filter::Lambda lambda);
|
void addFilter(Filter::Lambda lambda);
|
||||||
void addFilter(Filter::Pointer filter);
|
void addFilter(Filter::Pointer filter);
|
||||||
|
ScriptingInterface& _parent;
|
||||||
Mapping::Pointer _mapping;
|
Mapping::Pointer _mapping;
|
||||||
Route::Pointer _route;
|
Route::Pointer _route;
|
||||||
|
|
||||||
ScriptingInterface& _parent;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue