nguarracino

Waiting for C++11 auto

Nov 22nd, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void WebappSim::setLed (int cpuid, ApolloLEDs which, LEDstates state, LEDcolors color)
  2. {
  3.     QMap <int, QMap <int, QApolloPushButton*> >::iterator it1;
  4.     if ((it1 = m_apolloPushButtons.find (cpuid)) != m_apolloPushButtons.end())
  5.     {
  6.         QMap <int, QApolloPushButton*>::iterator it2;
  7.         if ((it2 = it1->find (which)) != it1->end())
  8.         {
  9.             (*it2)->setLedState (state);
  10.             (*it2)->setLedColor (color);
  11.             (*it2)->update();
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment