forked from mirrors/linphone-iphone
fix(Variant): avoid loop in generic variant creation
This commit is contained in:
parent
d6bf89b6e4
commit
bd2c2c4ce7
2 changed files with 7 additions and 5 deletions
|
|
@ -427,4 +427,10 @@ void Variant::getValue (int type, void *value, bool *soFarSoGood) const {
|
|||
}
|
||||
}
|
||||
|
||||
Variant Variant::createGeneric (void *value) {
|
||||
Variant variant(Generic);
|
||||
variant.getPrivate()->value.g = value;
|
||||
return variant;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -129,11 +129,7 @@ private:
|
|||
|
||||
void getValue (int type, void *value, bool *soFarSoGood) const;
|
||||
|
||||
static inline Variant createGeneric (void *value) {
|
||||
Variant variant(Generic);
|
||||
variant.setValue<void *>(value);
|
||||
return variant;
|
||||
}
|
||||
static Variant createGeneric (void *value);
|
||||
|
||||
VariantPrivate *mPrivate = nullptr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue