mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 07:22:25 +02:00
quiet compiler
This commit is contained in:
parent
9809fcfa54
commit
224aeea044
10 changed files with 12 additions and 6 deletions
|
@ -44,7 +44,7 @@ QScriptValue AnimVariantMap::animVariantMapToScriptValue(QScriptEngine* engine,
|
|||
break;
|
||||
default:
|
||||
// Note that we don't do mat4 in Javascript currently, and there's not yet a reason to start now.
|
||||
assert("AnimVariant::Type" == "valid");
|
||||
assert(QString("AnimVariant::Type") == QString("valid"));
|
||||
}
|
||||
};
|
||||
if (useNames) { // copy only the requested names
|
||||
|
|
|
@ -74,7 +74,7 @@ void UserInputMapper::registerDevice(InputDevice::Pointer device) {
|
|||
}
|
||||
const auto& deviceID = device->_deviceID;
|
||||
|
||||
int numberOfType = recordDeviceOfType(device->getName());
|
||||
recordDeviceOfType(device->getName());
|
||||
|
||||
qCDebug(controllers) << "Registered input device <" << device->getName() << "> deviceID = " << deviceID;
|
||||
for (const auto& inputMapping : device->getAvailableInputs()) {
|
||||
|
@ -266,7 +266,7 @@ void UserInputMapper::update(float deltaTime) {
|
|||
}
|
||||
|
||||
auto standardInputs = getStandardInputs();
|
||||
if (_lastStandardStates.size() != standardInputs.size()) {
|
||||
if ((int)_lastStandardStates.size() != standardInputs.size()) {
|
||||
_lastStandardStates.resize(standardInputs.size());
|
||||
for (auto& lastValue : _lastStandardStates) {
|
||||
lastValue = 0;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace controller {
|
|||
virtual void apply(float value, const Pointer& source) = 0;
|
||||
virtual Pose pose() { return Pose(); }
|
||||
virtual void apply(const Pose& value, const Pointer& source) {}
|
||||
virtual const bool isPose() { return _input.isPose(); }
|
||||
virtual bool isPose() { return _input.isPose(); }
|
||||
|
||||
virtual bool writeable() const { return true; }
|
||||
virtual bool readable() const { return true; }
|
||||
|
@ -54,6 +54,7 @@ namespace controller {
|
|||
|
||||
class LambdaEndpoint : public Endpoint {
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
LambdaEndpoint(ReadLambda readLambda, WriteLambda writeLambda = [](float) {})
|
||||
: Endpoint(Input::INVALID_INPUT), _readLambda(readLambda), _writeLambda(writeLambda) { }
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace controller {
|
|||
class EndpointConditional : public Conditional {
|
||||
public:
|
||||
EndpointConditional(Endpoint::Pointer endpoint) : _endpoint(endpoint) {}
|
||||
virtual bool satisfied() override { return _endpoint && _endpoint->value() != 0.0; }
|
||||
virtual bool satisfied() override { return _endpoint && _endpoint->value() != 0.0f; }
|
||||
private:
|
||||
Endpoint::Pointer _endpoint;
|
||||
};
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace controller {
|
|||
class AnyEndpoint : public Endpoint {
|
||||
friend class UserInputMapper;
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
AnyEndpoint(Endpoint::List children);
|
||||
virtual float value() override;
|
||||
virtual void apply(float newValue, const Endpoint::Pointer& source) override;
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace controller {
|
|||
class ArrayEndpoint : public Endpoint {
|
||||
friend class UserInputMapper;
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
using Pointer = std::shared_ptr<ArrayEndpoint>;
|
||||
ArrayEndpoint() : Endpoint(Input::INVALID_INPUT) { }
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
namespace controller {
|
||||
class CompositeEndpoint : public Endpoint, Endpoint::Pair {
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
CompositeEndpoint(Endpoint::Pointer first, Endpoint::Pointer second);
|
||||
|
||||
virtual float value() override;
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace controller {
|
|||
|
||||
class JSEndpoint : public Endpoint {
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
JSEndpoint(const QJSValue& callable)
|
||||
: Endpoint(Input::INVALID_INPUT), _callable(callable) {
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace controller {
|
|||
class ScriptEndpoint : public Endpoint {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
using Endpoint::apply;
|
||||
ScriptEndpoint(const QScriptValue& callable)
|
||||
: Endpoint(Input::INVALID_INPUT), _callable(callable) {
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
virtual void apply(float value, const Pointer& source) override {
|
||||
// For standard endpoints, the first NON-ZERO write counts.
|
||||
if (value != 0.0) {
|
||||
if (value != 0.0f) {
|
||||
_written = true;
|
||||
}
|
||||
VirtualEndpoint::apply(value, source);
|
||||
|
|
Loading…
Reference in a new issue