[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fwd: [TSVN][PATCH]C++ standard compliant loop header scopes

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2005-08-19 20:33:00 CEST

Stefan Fuhrmann wrote:
> Hi dev,
>
> this is a standard compliance issue. Therefore, it should
> be fixed irrespective of options to circumvent it.
>
> However, I might have accidentally changed the logic,
> so, please review it before commit it.
>
> [[[
> Adhere to the C++ standard saying that declarations in the
> for() statement belong to the loop's scope and are invisible
> outside of it.
>
> This is the supported since VC7.0 and is, by default, enforced
> in VC8.0.
> ]]]

Some of these seem to be undoing that requirement.
2 examples which seem to contradict each other:

> Index: TortoiseMerge/BaseView.cpp
> ===================================================================
> --- TortoiseMerge/BaseView.cpp (revision 4159)
> +++ TortoiseMerge/BaseView.cpp (working copy)
> - for (i=0; i<nLength; i++)
> + for (int i=0; i<nLength; i++)
> Index: TortoiseMerge/MainFrm.cpp
> ===================================================================
> --- TortoiseMerge/MainFrm.cpp (revision 4159)
> +++ TortoiseMerge/MainFrm.cpp (working copy)
> - for (int i=m_nSearchIndex; i<m_pwndLeftView->m_arDiffLines->GetCount(); i++)
> + int i = 0;
> + for (i=m_nSearchIndex; i<m_pwndLeftView->m_arDiffLines->GetCount(); i++)

Simon

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Aug 19 20:32:40 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.