mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
Ref T709, avoid pure virtual assert by removing the JSON ctor, which is calling a virtual function in the ctor
This commit is contained in:
committed by
Mat Sutcliffe
parent
0b728053f0
commit
024360a5df
@@ -38,11 +38,6 @@ namespace BlackMisc
|
|||||||
CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree()
|
CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree(const std::string &json)
|
|
||||||
{
|
|
||||||
this->parseXSwiftBusString(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
|
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
|
||||||
{
|
{
|
||||||
if (json.empty()) { return false; }
|
if (json.empty()) { return false; }
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ namespace BlackMisc
|
|||||||
//! Constructor.
|
//! Constructor.
|
||||||
CXSwiftBusSettingsQtFree();
|
CXSwiftBusSettingsQtFree();
|
||||||
|
|
||||||
//! JSON Constructor.
|
|
||||||
CXSwiftBusSettingsQtFree(const std::string &json);
|
|
||||||
|
|
||||||
//! Destructor.
|
//! Destructor.
|
||||||
~CXSwiftBusSettingsQtFree() = default;
|
~CXSwiftBusSettingsQtFree() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ namespace XSwiftBus
|
|||||||
|
|
||||||
void CService::setSettingsJson(const std::string &jsonString)
|
void CService::setSettingsJson(const std::string &jsonString)
|
||||||
{
|
{
|
||||||
const CSettings s(jsonString);
|
CSettings s;
|
||||||
|
s.parseXSwiftBusString(jsonString);
|
||||||
this->setSettings(s);
|
this->setSettings(s);
|
||||||
INFO_LOG("Received settings " + s.convertToString());
|
INFO_LOG("Received settings " + s.convertToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,6 @@ namespace XSwiftBus
|
|||||||
// void
|
// void
|
||||||
}
|
}
|
||||||
|
|
||||||
CSettings::CSettings(const std::string &json) : CXSwiftBusSettingsQtFree(json)
|
|
||||||
{
|
|
||||||
// void
|
|
||||||
}
|
|
||||||
|
|
||||||
CSettings CSettingsProvider::getSettings() const
|
CSettings CSettingsProvider::getSettings() const
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> l(m_settingsMutex);
|
std::lock_guard<std::mutex> l(m_settingsMutex);
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ namespace XSwiftBus
|
|||||||
//! Constructor.
|
//! Constructor.
|
||||||
CSettings();
|
CSettings();
|
||||||
|
|
||||||
//! JSON constructor
|
|
||||||
CSettings(const std::string &json);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! \copydoc BlackMisc::Simulation::Settings::CXSwiftBusSettingsQtFree::objectUpdated
|
//! \copydoc BlackMisc::Simulation::Settings::CXSwiftBusSettingsQtFree::objectUpdated
|
||||||
virtual void objectUpdated() override final {}
|
virtual void objectUpdated() override final {}
|
||||||
|
|||||||
Reference in New Issue
Block a user