Format-only fixes from previous commit, oops.
This commit is contained in:
parent
8060051fc5
commit
0f68b19648
5 changed files with 16 additions and 20 deletions
|
@ -39,14 +39,14 @@
|
|||
|
||||
class FGCommonInput {
|
||||
public:
|
||||
using binding_list_t = SGBindingList;
|
||||
using binding_list_t = SGBindingList;
|
||||
|
||||
/*
|
||||
/*
|
||||
read all "binding" nodes directly under the specified base node and fill the
|
||||
vector of SGBinding supplied in binding_list. Reads all the mod-xxx bindings and
|
||||
add the corresponding SGBindings.
|
||||
*/
|
||||
static void read_bindings (const SGPropertyNode * base, binding_list_t * binding_list, int modifiers, const std::string & module );
|
||||
static void read_bindings(const SGPropertyNode* base, binding_list_t* binding_list, int modifiers, const std::string& module);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -136,7 +136,7 @@ void FGInputEvent::fire( FGEventData & eventData )
|
|||
}
|
||||
}
|
||||
|
||||
void FGInputEvent::fire( SGAbstractBinding * binding, FGEventData & eventData )
|
||||
void FGInputEvent::fire(SGAbstractBinding* binding, FGEventData& eventData)
|
||||
{
|
||||
binding->fire();
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void FGAxisEvent::fire( FGEventData & eventData )
|
|||
FGInputEvent::fire( ed );
|
||||
}
|
||||
|
||||
void FGAbsAxisEvent::fire( SGAbstractBinding * binding, FGEventData & eventData )
|
||||
void FGAbsAxisEvent::fire(SGAbstractBinding* binding, FGEventData& eventData)
|
||||
{
|
||||
// sets the "setting" node
|
||||
binding->fire( eventData.value );
|
||||
|
@ -207,7 +207,7 @@ FGRelAxisEvent::FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node
|
|||
tolerance = 0.0;
|
||||
}
|
||||
|
||||
void FGRelAxisEvent::fire( SGAbstractBinding * binding, FGEventData & eventData )
|
||||
void FGRelAxisEvent::fire(SGAbstractBinding* binding, FGEventData& eventData)
|
||||
{
|
||||
// sets the "offset" node
|
||||
binding->fire( eventData.value, 1.0 );
|
||||
|
|
|
@ -151,7 +151,7 @@ public:
|
|||
static FGInputEvent * NewObject( FGInputDevice * device, SGPropertyNode_ptr node );
|
||||
|
||||
protected:
|
||||
virtual void fire( SGAbstractBinding * binding, FGEventData & eventData );
|
||||
virtual void fire(SGAbstractBinding* binding, FGEventData& eventData);
|
||||
/* A more or less meaningfull description of the event */
|
||||
std::string desc;
|
||||
|
||||
|
@ -214,7 +214,7 @@ public:
|
|||
FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node );
|
||||
|
||||
protected:
|
||||
void fire( SGAbstractBinding * binding, FGEventData & eventData ) override;
|
||||
void fire(SGAbstractBinding* binding, FGEventData& eventData) override;
|
||||
};
|
||||
|
||||
class FGAbsAxisEvent : public FGAxisEvent
|
||||
|
@ -223,7 +223,7 @@ public:
|
|||
FGAbsAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) : FGAxisEvent( device, node ) {}
|
||||
|
||||
protected:
|
||||
void fire( SGAbstractBinding * binding, FGEventData & eventData ) override;
|
||||
void fire(SGAbstractBinding* binding, FGEventData& eventData) override;
|
||||
};
|
||||
|
||||
typedef class SGSharedPtr<FGInputEvent> FGInputEvent_ptr;
|
||||
|
|
|
@ -16,11 +16,11 @@ using NasalBindingRef = SGSharedPtr<NasalBinding>;
|
|||
|
||||
typedef nasal::Ghost<SGConditionRef> NasalCondition;
|
||||
|
||||
void NasalBinding::innerFire() const
|
||||
{
|
||||
void NasalBinding::innerFire() const
|
||||
{
|
||||
auto nas = globals->get_subsystem<FGNasalSys>();
|
||||
m_callback(nas->wrappedPropsNode(_arg));
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
static naRef f_createCondition(naContext c, naRef me, int argc, naRef* args)
|
||||
|
@ -56,6 +56,5 @@ naRef initNasalCondition(naRef globals, naContext c)
|
|||
nasal::Hash(globals, c).set("_createCondition", f_createCondition);
|
||||
|
||||
|
||||
|
||||
return naNil();
|
||||
}
|
||||
|
|
|
@ -21,15 +21,12 @@ naRef initNasalCondition(naRef globals, naContext c);
|
|||
class NasalBinding : public SGAbstractBinding
|
||||
{
|
||||
public:
|
||||
using NasalCallback = std::function<void(naRef)>;
|
||||
using NasalCallback = std::function<void(naRef)>;
|
||||
|
||||
NasalBinding(NasalCallback cb) :
|
||||
m_callback(cb)
|
||||
{};
|
||||
NasalBinding(NasalCallback cb) : m_callback(cb){};
|
||||
|
||||
private:
|
||||
void innerFire() const override;
|
||||
void innerFire() const override;
|
||||
|
||||
NasalCallback m_callback;
|
||||
NasalCallback m_callback;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue