- 1
- 2
width ? width-- : width;
height ? height-- : height;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 6
+6
width ? width-- : width;
height ? height-- : height;
Ахуй нехуевый. Не говнокод, наверно, но всё же.
+7
inline Gdiplus::Color colorrefToGdiColor(COLORREF col, char alpha)
{
return (static_cast<unsigned long>(static_cast<unsigned char>((col & Gdiplus::Color::RedMask) >> Gdiplus::Color::RedShift)) << Gdiplus::Color::BlueShift) | (static_cast<unsigned long>(static_cast<unsigned char>((col & Gdiplus::Color::GreenMask) >> Gdiplus::Color::GreenShift)) << Gdiplus::Color::GreenShift) | (static_cast<unsigned long>(static_cast<unsigned char>((col & Gdiplus::Color::BlueMask) >> Gdiplus::Color::BlueShift)) << Gdiplus::Color::RedShift) | (static_cast<unsigned long>(alpha) << Gdiplus::Color::AlphaShift);
}
Тихо себя ненавижу. Слава Б-г'у это всё выкидывается.
−8.4
return (hWnd) ? (bool)ShowWindow(hWnd, (state) ? SW_NORMAL : SW_HIDE) : false;
Я долго пытался понять, что я имел ввиду.
−1.1
Голосование за бан во все интернеты для Nemerle.
−6.1
#define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
#define GetSysModalWindow() (NULL)
#define SetSysModalWindow(hWnd) (NULL)
Microsoft SDK, WinUser.h.
+3.2
case WM_DESTROY:
// Microsoft, you MORONS! Don't destroy stuff I create!
// Oh well, try to handle this as gracefully as possible so we
// don't send any commands to the now non-existent window:
tablet_close(hWnd);
if (window) window->destroy();
fl_prune_deferred_calls(hWnd);
break;
FLTK. В свое время заставило похихикать.