On Thursday 24 August 2006 17:32, Frans Englich wrote: > On Thursday 24 August 2006 15:10, Dirk Mueller wrote: > > SVN commit 576668 by mueller: > > > > compile++ > > > > > > M +2 -0 html_inlineimpl.cpp > > > > > > --- branches/KDE/3.5/kdelibs/khtml/html/html_inlineimpl.cpp #576667:576668 > > @@ -175,11 +175,13 @@ > > switch(attr->id()) > > { > > case ATTR_HREF: > > + { > > bool hadAnchor = m_hasAnchor; > > m_hasAnchor = attr->val() != 0; > > getDocument()->incDOMTreeVersion(); > > if (hadAnchor != m_hasAnchor) > > setChanged(); > > + } > > break; > > case ATTR_TARGET: > > m_hasTarget = attr->val() != 0; > > > Hm, how did this fix a breakage? Was the scope needed to avoid name clashing? Without {} the compiler tells you that the boolean variable hadAnchor is stil valid after the end of this case and into the next one, which is not good :) Just try it in your code, you'll see the warning/error. -- David Faure, faure@kde.org, sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).