mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
fix one of the limitations of QT_TRY/QT_CATCH macros
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
b221d460cb
commit
890cf73ff9
1 changed files with 3 additions and 4 deletions
|
@ -653,9 +653,8 @@ inline void qt_noop(void) {}
|
||||||
|
|
||||||
/* These wrap try/catch so we can switch off exceptions later.
|
/* These wrap try/catch so we can switch off exceptions later.
|
||||||
|
|
||||||
Beware - do not use more than one QT_CATCH per QT_TRY, and do not use
|
Beware - do not use the exception instance in the catch block.
|
||||||
the exception instance in the catch block.
|
If you can't live with that constraint, don't use these macros.
|
||||||
If you can't live with those constraints, don't use these macros.
|
|
||||||
Use the QT_NO_EXCEPTIONS macro to protect your code instead.
|
Use the QT_NO_EXCEPTIONS macro to protect your code instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -665,7 +664,7 @@ inline void qt_noop(void) {}
|
||||||
|
|
||||||
#ifdef QT_NO_EXCEPTIONS
|
#ifdef QT_NO_EXCEPTIONS
|
||||||
# define QT_TRY if (true)
|
# define QT_TRY if (true)
|
||||||
# define QT_CATCH(A) else
|
# define QT_CATCH(A) else if (false)
|
||||||
# define QT_THROW(A) qt_noop()
|
# define QT_THROW(A) qt_noop()
|
||||||
# define QT_RETHROW qt_noop()
|
# define QT_RETHROW qt_noop()
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue