VirtualBox

Changeset 25145 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Dec 2, 2009 12:39:15 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55553
Message:

Main: remove dead assert macro code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r24989 r25145  
    200200#endif
    201201
    202 
    203 /**
    204  *  Special version of the AssertFailed macro to be used within VirtualBoxBase
    205  *  subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.
    206  *
    207  *  See ComAssert for more info.
    208  */
    209 #if defined (DEBUG)
    210 #define ComAssertFailed()   AssertFailed()
    211 #else
    212 #define ComAssertFailed()   \
    213     do { \
    214         setError(E_FAIL, "Assertion failed at '%s' (%d) in %s.\n" \
    215                          "Please contact the product vendor!", \
    216                  __FILE__, __LINE__, __PRETTY_FUNCTION__); \
    217     } while (0)
    218 #endif
    219 
    220 /**
    221  *  Special version of the AssertMsgFailed macro to be used within VirtualBoxBase
    222  *  subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.
    223  *
    224  *  See ComAssert for more info.
    225  *
    226  *  @param   a   printf argument list (in parenthesis).
    227  */
    228 #if defined (DEBUG)
    229 #define ComAssertMsgFailed(a)   AssertMsgFailed(a)
    230 #else
    231 #define ComAssertMsgFailed(a)   \
    232     do { \
    233         setError(E_FAIL, "Assertion failed at '%s' (%d) in %s.\n" \
    234                          "%s.\n" \
    235                          "Please contact the product vendor!", \
    236                  __FILE__, __LINE__, __PRETTY_FUNCTION__, Utf8StrFmt a .raw()); \
    237     } while (0)
    238 #endif
    239 
    240 /**
    241  *  Special version of the ComAssertMsgFailed macro that additionally takes
    242  *  line number, file and function arguments to inject an assertion position
    243  *  that differs from the position where this macro is instantiated.
    244  *
    245  *  @param   a                  printf argument list (in parenthesis).
    246  *  @param   file, line, func   Line number (int), file and function (const char *).
    247  */
    248 #if defined (DEBUG)
    249 #define ComAssertMsgFailedPos(a, file, line, func)              \
    250     do {                                                        \
    251         AssertMsg1((const char *)0, line, file, func);          \
    252         AssertMsg2 a;                                           \
    253         AssertBreakpoint();                                     \
    254     } while (0)
    255 #else
    256 #define ComAssertMsgFailedPos(a, file, line, func)              \
    257     do {                                                        \
    258         setError(E_FAIL,                                        \
    259                  "Assertion failed at '%s' (%d) in %s.\n"       \
    260                  "%s.\n"                                        \
    261                  "Please contact the product vendor!",          \
    262                  file, line, func, Utf8StrFmt a .raw());        \
    263     } while (0)
    264 #endif
    265 
    266202/**
    267203 *  Special version of the AssertComRC macro to be used within VirtualBoxBase
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette