mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #199, removed Q_ASSERT as nullptr shall be a valid return value for non-existing contexts
This commit is contained in:
@@ -176,89 +176,81 @@ namespace BlackCore
|
||||
|
||||
IContextNetwork *CRuntime::getIContextNetwork()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextNetwork, "CCoreRuntime", "Requested missing network context");
|
||||
return this->m_contextNetwork;
|
||||
}
|
||||
|
||||
const IContextNetwork *CRuntime::getIContextNetwork() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextNetwork, "CCoreRuntime", "Requested missing network context");
|
||||
return this->m_contextNetwork;
|
||||
}
|
||||
|
||||
IContextAudio *CRuntime::getIContextAudio()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
||||
return this->m_contextAudio;
|
||||
}
|
||||
|
||||
const IContextAudio *CRuntime::getIContextAudio() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
||||
return this->m_contextAudio;
|
||||
}
|
||||
|
||||
IContextSettings *CRuntime::getIContextSettings()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSettings, "CCoreRuntime", "Requested missing settings context");
|
||||
return this->m_contextSettings;
|
||||
}
|
||||
|
||||
const IContextSettings *CRuntime::getIContextSettings() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSettings, "CCoreRuntime", "Requested missing settings context");
|
||||
return this->m_contextSettings;
|
||||
}
|
||||
|
||||
const IContextApplication *CRuntime::getIContextApplication() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextApplication, "CCoreRuntime", "Requested missing application context");
|
||||
return this->m_contextApplication;
|
||||
}
|
||||
|
||||
IContextApplication *CRuntime::getIContextApplication()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextApplication, "CCoreRuntime", "Requested missing application context");
|
||||
return this->m_contextApplication;
|
||||
}
|
||||
|
||||
const IContextSimulator *CRuntime::getIContextSimulator() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
||||
return this->m_contextSimulator;
|
||||
}
|
||||
|
||||
IContextSimulator *CRuntime::getIContextSimulator()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
||||
return this->m_contextSimulator;
|
||||
}
|
||||
|
||||
CContextAudio *CRuntime::getCContextAudio()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
||||
Q_ASSERT_X(this->m_contextAudio->usingLocalObjects(), "CCoreRuntime", "Cannot specialize to local object");
|
||||
return static_cast<CContextAudio *>(this->m_contextAudio);
|
||||
}
|
||||
|
||||
CContextAudio *CRuntime::getCContextAudio() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
||||
Q_ASSERT_X(this->m_contextAudio->usingLocalObjects(), "CCoreRuntime", "Cannot specialize to local object");
|
||||
return static_cast<CContextAudio *>(this->m_contextAudio);
|
||||
}
|
||||
|
||||
CContextApplication *CRuntime::getCContextApplication()
|
||||
{
|
||||
return static_cast<CContextApplication *>(this->m_contextApplication);
|
||||
}
|
||||
|
||||
CContextApplication *CRuntime::getCContextApplication() const
|
||||
{
|
||||
return static_cast<CContextApplication *>(this->m_contextApplication);
|
||||
}
|
||||
|
||||
CContextSimulator *CRuntime::getCContextSimulator()
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
||||
Q_ASSERT_X(this->m_contextSimulator->usingLocalObjects(), "CCoreRuntime", "Cannot specialize to local object");
|
||||
return static_cast<CContextSimulator *>(this->m_contextSimulator);
|
||||
}
|
||||
|
||||
CContextSimulator *CRuntime::getCContextSimulator() const
|
||||
{
|
||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
||||
Q_ASSERT_X(this->m_contextSimulator->usingLocalObjects(), "CCoreRuntime", "Cannot specialize to local object");
|
||||
return static_cast<CContextSimulator *>(this->m_contextSimulator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user