Mistři v programování na #hovnokod

C/C++ #798

kus kodu z projektu ffdshow. Bohuzel programator nevi, ze sizeof(this) vraci neco jineho, nez sizeof(*this) a proto si mysli, ze za vsechno muze kompilator

TprintPrefs::TprintPrefs(IffdshowBase *Ideci,
                         const TfontSettings *IfontSettings)
{
  memset(this, 0, sizeof(this)); // This doesn't seem to
                                 // help after optimization.
  dx = dy = 0;
  isOSD = false;
  xpos = ypos = 0;
  align = 0;
  linespacing = 0;
  sizeDx = 0;
  sizeDy = 0;
  ...
}

HovnoKod,