mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 06:35:41 +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()
|
IContextNetwork *CRuntime::getIContextNetwork()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextNetwork, "CCoreRuntime", "Requested missing network context");
|
|
||||||
return this->m_contextNetwork;
|
return this->m_contextNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextNetwork *CRuntime::getIContextNetwork() const
|
const IContextNetwork *CRuntime::getIContextNetwork() const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextNetwork, "CCoreRuntime", "Requested missing network context");
|
|
||||||
return this->m_contextNetwork;
|
return this->m_contextNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
IContextAudio *CRuntime::getIContextAudio()
|
IContextAudio *CRuntime::getIContextAudio()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
|
||||||
return this->m_contextAudio;
|
return this->m_contextAudio;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextAudio *CRuntime::getIContextAudio() const
|
const IContextAudio *CRuntime::getIContextAudio() const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextAudio, "CCoreRuntime", "Requested missing audio context");
|
|
||||||
return this->m_contextAudio;
|
return this->m_contextAudio;
|
||||||
}
|
}
|
||||||
|
|
||||||
IContextSettings *CRuntime::getIContextSettings()
|
IContextSettings *CRuntime::getIContextSettings()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextSettings, "CCoreRuntime", "Requested missing settings context");
|
|
||||||
return this->m_contextSettings;
|
return this->m_contextSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextSettings *CRuntime::getIContextSettings() const
|
const IContextSettings *CRuntime::getIContextSettings() const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextSettings, "CCoreRuntime", "Requested missing settings context");
|
|
||||||
return this->m_contextSettings;
|
return this->m_contextSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextApplication *CRuntime::getIContextApplication() const
|
const IContextApplication *CRuntime::getIContextApplication() const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextApplication, "CCoreRuntime", "Requested missing application context");
|
|
||||||
return this->m_contextApplication;
|
return this->m_contextApplication;
|
||||||
}
|
}
|
||||||
|
|
||||||
IContextApplication *CRuntime::getIContextApplication()
|
IContextApplication *CRuntime::getIContextApplication()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextApplication, "CCoreRuntime", "Requested missing application context");
|
|
||||||
return this->m_contextApplication;
|
return this->m_contextApplication;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextSimulator *CRuntime::getIContextSimulator() const
|
const IContextSimulator *CRuntime::getIContextSimulator() const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
|
||||||
return this->m_contextSimulator;
|
return this->m_contextSimulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
IContextSimulator *CRuntime::getIContextSimulator()
|
IContextSimulator *CRuntime::getIContextSimulator()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->m_contextSimulator, "CCoreRuntime", "Requested missing simulator context");
|
|
||||||
return this->m_contextSimulator;
|
return this->m_contextSimulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
CContextAudio *CRuntime::getCContextAudio()
|
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);
|
return static_cast<CContextAudio *>(this->m_contextAudio);
|
||||||
}
|
}
|
||||||
|
|
||||||
CContextAudio *CRuntime::getCContextAudio() const
|
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);
|
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()
|
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);
|
return static_cast<CContextSimulator *>(this->m_contextSimulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
CContextSimulator *CRuntime::getCContextSimulator() const
|
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);
|
return static_cast<CContextSimulator *>(this->m_contextSimulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user