fix: not compiling on clang
This commit is contained in:
parent
6f9856c384
commit
a022e682b7
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ static std::string castFromVariant(std::string valueStr, std::string fieldType)
|
|||
}
|
||||
|
||||
std::string mappedType = MAPPED_TYPE[fieldType];
|
||||
return valueStr + ".get<" + (!mappedType.empty() ? mappedType : fieldType) + ">()";
|
||||
return "(" + fieldType + ")" + valueStr + ".get<" + (!mappedType.empty() ? mappedType : fieldType) + ">()";
|
||||
}
|
||||
|
||||
static std::string castToVariant(std::string valueStr, std::string fieldType) {
|
||||
|
|
|
@ -9,7 +9,7 @@ Service::Service(const InstanceType* type) : Instance(type){}
|
|||
// Fail if parented to non-datamodel, otherwise lock parent
|
||||
void Service::OnParentUpdated(std::optional<std::shared_ptr<Instance>> oldParent, std::optional<std::shared_ptr<Instance>> newParent) {
|
||||
if (!newParent || newParent.value()->GetClass() != &DataModel::TYPE) {
|
||||
Logger::fatalErrorf("Service %s was parented to object of type %s", GetClass()->className, newParent ? newParent.value()->GetClass()->className : "NULL");
|
||||
Logger::fatalErrorf("Service %s was parented to object of type %s", GetClass()->className.c_str(), newParent ? newParent.value()->GetClass()->className.c_str() : "NULL");
|
||||
panic();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue