VideoSource videoSource(fileName); const BYTE* frame; Image image; while (frame = vs.getFrame()) { assert(GrayscaleSerializer::Status::success == GrayscaleSerializer::load(frame, image)); processImage(image); }
#ifdef NDEBUG #define assert(exp) ((void)0) #else
#define ES_ASSERT(COND,RC) do{if(!(COND)) return (RC);}while(0) #define ES_ASSERT_(COND) do{if(!(COND)) return;}while(0)
void ES_TileValidateRect( EIF_INTEGER aiHwnd, EIF_POINTER alpRect) { ES_ASSERT_(IsWindow((HWND)aiHwnd)); ES_ASSERT_(ValidateRect((HWND)aiHwnd,(RECT*)alpRect)); }
class xxxx_exception : public std::exception { // здесь не особо интересно, скипнул } YYYY xxxxCheck(YYYY resultCode) { if (failure_condition(resultCode)) { throw xxxx_exception(f(resultCode)); } return resultCode; }
отредактировано: 15-11-2003 23:16 - Centaur