Revision: 5064 http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5064&view=rev Author: atkac Date: 2013-03-14 17:11:22 +0000 (Thu, 14 Mar 2013) Log Message: ----------- Simplify rfb::ParameterIterator - we always iterate over all enabled params.
Modified Paths: -------------- trunk/common/rfb/Configuration.h trunk/unix/xserver/hw/vnc/vncExtInit.cc trunk/unix/xserver/hw/vnc/xf86vncModule.cc Modified: trunk/common/rfb/Configuration.h =================================================================== --- trunk/common/rfb/Configuration.h 2013-03-14 15:49:29 UTC (rev 5063) +++ trunk/common/rfb/Configuration.h 2013-03-14 17:11:22 UTC (rev 5064) @@ -268,12 +268,12 @@ }; // -=- ParameterIterator - // Iterates over all the Parameters in a Configuration group. The - // current Parameter is accessed via param, the current Configuration - // via config. The next() method moves on to the next Parameter. + // Iterates over all enabled parameters (global + server/viewer). + // Current Parameter is accessed via param, the current Configuration + // via config. The next() method moves on to the next Parameter. struct ParameterIterator { - ParameterIterator(Configuration* c) : config(c), param(c ? c->head : 0) {} + ParameterIterator() : config(Configuration::global()), param(config->head) {} void next() { param = param->_next; while (!param) { Modified: trunk/unix/xserver/hw/vnc/vncExtInit.cc =================================================================== --- trunk/unix/xserver/hw/vnc/vncExtInit.cc 2013-03-14 15:49:29 UTC (rev 5063) +++ trunk/unix/xserver/hw/vnc/vncExtInit.cc 2013-03-14 17:11:22 UTC (rev 5064) @@ -768,7 +768,7 @@ int nParams = 0; int len = 0; - for (ParameterIterator i(Configuration::global()); i.param; i.next()) { + for (ParameterIterator i; i.param; i.next()) { int l = strlen(i.param->getName()); if (l <= 255) { nParams++; @@ -792,7 +792,7 @@ WriteToClient(client, sizeof(xVncExtListParamsReply), (char *)&rep); rdr::U8* data = new rdr::U8[len]; rdr::U8* ptr = data; - for (ParameterIterator i(Configuration::global()); i.param; i.next()) { + for (ParameterIterator i; i.param; i.next()) { int l = strlen(i.param->getName()); if (l <= 255) { *ptr++ = l; Modified: trunk/unix/xserver/hw/vnc/xf86vncModule.cc =================================================================== --- trunk/unix/xserver/hw/vnc/xf86vncModule.cc 2013-03-14 15:49:29 UTC (rev 5063) +++ trunk/unix/xserver/hw/vnc/xf86vncModule.cc 2013-03-14 17:11:22 UTC (rev 5064) @@ -97,7 +97,7 @@ for (int scr = 0; scr < screenInfo.numScreens; scr++) { ScrnInfoPtr pScrn = xf86Screens[scr]; - for (ParameterIterator i(Configuration::global()); i.param; i.next()) { + for (ParameterIterator i; i.param; i.next()) { const char *val; #if XORG < 112 val = xf86FindOptionValue(pScrn->options, i.param->getName()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Tigervnc-commits mailing list Tigervnc-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-commits