1. C++ / Говнокод #7079

    +147

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    int __fastcall TForm1::iscomm(AnsiString str)
    {
    int i=1;
    while (str[i]==' ')
     i++;
    if (str[i]=='#')
     {
      return 1;
     }
    else
     {
      return 0;
     };
    };

    yasosiska, 27 Июня 2011

    Комментарии (7)
  2. C++ / Говнокод #7078

    +147

    1. 1
    2. 2
    3. 3
    cout<<"enterX"<<endl;
         cin >>x;
    x = 0.125;

    yasosiska, 27 Июня 2011

    Комментарии (1)
  3. C++ / Говнокод #7077

    +147

    1. 1
    2. 2
    3. 3
    uint32_t getuint32(char *p){
      return (*p<<24)|(*(p+1)<<16)|(*(p+2)<<8)|(*(p+3));
    }

    yasosiska, 27 Июня 2011

    Комментарии (21)
  4. C++ / Говнокод #7076

    +147

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    if(dOper1p->Caption == "-0")
       dOper1p->Caption = "+0";
     if(dOper2p->Caption == "-0")
       dOper2p->Caption = "+0";
    
     if(dOper1m->Caption == "-0.0")
       dOper1m->Caption = "+0.0";
     if(dOper2m->Caption == "-0.0")
       dOper2m->Caption = "+0.0";

    yasosiska, 27 Июня 2011

    Комментарии (8)
  5. C++ / Говнокод #7059

    +179

    1. 1
    2. 2
    public:
      void* getThis(void){return this;};;;;

    Говногость, 26 Июня 2011

    Комментарии (37)
  6. C++ / Говнокод #7054

    +162

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    ModuleManagerImpl::ModuleManagerImpl()
    {
    	ModuleManager::loadPlugins();
    	Config config = ProfileDialog::profilesInfo();
    #ifdef QUTIM_SINGLE_PROFILE
    	bool singleProfile = true;
    #else
    	bool singleProfile = false;
    #endif
    	singleProfile = config.value("singleProfile", singleProfile);
    	if (singleProfile) {
    		if (!config.hasChildGroup("profile")) {
    			QWidget *wizard = new ProfileCreationWizard(this, QString(), QString(), true);
    			wizard->setAttribute(Qt::WA_DeleteOnClose, true);
    			wizard->setAttribute(Qt::WA_QuitOnClose, false);
    			SystemIntegration::show(wizard);
    		} else {
    			config.beginGroup("profile");
    			if(ProfileDialog::acceptProfileInfo(config, QString())) {
    				QTimer::singleShot(0, this, SLOT(initExtensions()));
    			} else {
    				qWarning("Can't login");
    				QDialog *dialog = new ProfileDialog(config, this);
    				SystemIntegration::show(dialog);
    			}
    			config.endGroup();
    		}
    	} else {
    		QDialog *dialog = new ProfileDialog(config, this);
    		SystemIntegration::show(dialog);
    	}
    }

    не знаю как вам, а мне не нравится объявление singleProfile.
    qutim/core/src/modulemanagerimpl.cpp

    POPSuL, 25 Июня 2011

    Комментарии (9)
  7. C++ / Говнокод #7053

    +158

    1. 1
    2. 2
    3. 3
    for (int i = 0; i < n; i++)
       if (i == n + 2) 
          //действия

    =)

    MoN, 25 Июня 2011

    Комментарии (11)
  8. C++ / Говнокод #7048

    +162

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    setGeometry((int)(QApplication::desktop()->width() -
    (QApplication::desktop()->width() -
      (QApplication::desktop()->width() / 2)) * 1.5) / 2,
      (int)(QApplication::desktop()->height() -
    (QApplication::desktop()->height() -
      (QApplication::desktop()->height() / 2)) * 1.5) / 2,
      (int)((QApplication::desktop()->width() -
    (QApplication::desktop()->width() / 2)) * 1.5),
      (int)((QApplication::desktop()->height() -
    (QApplication::desktop()->height() / 2)) * 1.5));

    Center app window!

    Aleskey, 24 Июня 2011

    Комментарии (24)
  9. C++ / Говнокод #7041

    +169

    1. 1
    void failware(void){0;return;};

    Говногость, 24 Июня 2011

    Комментарии (14)
  10. C++ / Говнокод #7040

    +173

    1. 1
    throw (i?getMainException():int());

    Говногость, 24 Июня 2011

    Комментарии (29)