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

Re: Patch: Refactoring LocatorBar

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 04 Feb 2010 19:22:25 +0100

On 04.02.2010 08:18, Dmitry wrote:
> Hey.
>
> The following patch addresses code duplication in LocatorBar.

Committed in r18526.

> Also in DocumentUpdated() some strange logic exists. "state" variable
> is initialized, then for each view if view data is not empty "state"
> is set to the state of the first line, then a loop runs where "state"
> might have been changed and finally "state" is unconditionally
> appended to the state array (m_arXXXXState.Add(state); line). Then
> control falls through to the next view and "state" is not
> unconditionally reset and so if the next view has empty view data
> "state" will preserve its value from the prior computations. Is that
> what is intended? Shouldn't "state" be reset at the same time as
> "identcount" is reset to 1?

No, but right before handling the next view(s). Resetting it when
identcount is reset would be wrong: the state is used to track when the
diff state changes, so we must not reset it there.

Fix coming up...

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2444926
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-02-04 19:22:42 CET

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.