mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T488 Fixed cppcheck warnings.
This commit is contained in:
@@ -25,9 +25,10 @@ namespace XSwiftBus
|
||||
{
|
||||
public:
|
||||
//! Constructor.
|
||||
CCommand(const char *name, const char *description, std::function<void()> handler) : m_handler(handler)
|
||||
CCommand(const char *name, const char *description, std::function<void()> handler) :
|
||||
m_handler(handler),
|
||||
m_command(XPLMCreateCommand(name, description))
|
||||
{
|
||||
m_command = XPLMCreateCommand(name, description);
|
||||
XPLMRegisterCommandHandler(m_command, callback, false, static_cast<void*>(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@ namespace XSwiftBus
|
||||
virtual ~CDrawable() { hide(); }
|
||||
|
||||
//! Register the draw callback.
|
||||
virtual void show()
|
||||
void show()
|
||||
{
|
||||
XPLMRegisterDrawCallback(callback, m_phase, m_before, static_cast<void*>(this));
|
||||
}
|
||||
|
||||
//! Unregister the draw callback.
|
||||
virtual void hide()
|
||||
void hide()
|
||||
{
|
||||
XPLMUnregisterDrawCallback(callback, m_phase, m_before, static_cast<void*>(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user