mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
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
|
LINPHONE_END_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -129,11 +129,7 @@ private:
|
||||||
|
|
||||||
void getValue (int type, void *value, bool *soFarSoGood) const;
|
void getValue (int type, void *value, bool *soFarSoGood) const;
|
||||||
|
|
||||||
static inline Variant createGeneric (void *value) {
|
static Variant createGeneric (void *value);
|
||||||
Variant variant(Generic);
|
|
||||||
variant.setValue<void *>(value);
|
|
||||||
return variant;
|
|
||||||
}
|
|
||||||
|
|
||||||
VariantPrivate *mPrivate = nullptr;
|
VariantPrivate *mPrivate = nullptr;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue