Ref T488 Fixed cppcheck warnings.

This commit is contained in:
Mat Sutcliffe
2018-12-26 20:55:45 +00:00
parent e709d27e05
commit 7cb581f865
8 changed files with 19 additions and 22 deletions

View File

@@ -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));
}

View File

@@ -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));
}