mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix(general): avoid invalid cast on Windows with L_DECLARE_PRIVATE macro
This commit is contained in:
parent
fdac4f1cee
commit
76d2303c40
1 changed files with 4 additions and 6 deletions
|
|
@ -189,15 +189,13 @@ namespace Private {
|
|||
#define L_INTERNAL_DECLARE_PRIVATE(CLASS) \
|
||||
inline CLASS ## Private *getPrivate () { \
|
||||
L_INTERNAL_CHECK_OBJECT_INHERITANCE(CLASS); \
|
||||
return reinterpret_cast<CLASS ## Private *>( \
|
||||
LinphonePrivate::Private::BetterPrivateAncestor<CLASS>::mPrivate \
|
||||
); \
|
||||
using TypeAncestor = LinphonePrivate::Private::BetterPrivateAncestor<CLASS>; \
|
||||
return reinterpret_cast<CLASS ## Private *>(TypeAncestor::mPrivate); \
|
||||
} \
|
||||
inline const CLASS ## Private *getPrivate () const { \
|
||||
L_INTERNAL_CHECK_OBJECT_INHERITANCE(CLASS); \
|
||||
return reinterpret_cast<const CLASS ## Private *>( \
|
||||
LinphonePrivate::Private::BetterPrivateAncestor<CLASS>::mPrivate \
|
||||
); \
|
||||
using TypeAncestor = LinphonePrivate::Private::BetterPrivateAncestor<CLASS>; \
|
||||
return reinterpret_cast<const CLASS ## Private *>(TypeAncestor::mPrivate); \
|
||||
} \
|
||||
friend class CLASS ## Private; \
|
||||
friend class Wrapper;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue