From 542e26909ff74475784c87d36451da9fba244974 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 13 Apr 2005 19:28:44 +0000 Subject: Performance improvement in [clock] - FR 1182459 --- ChangeLog | 6 ++++++ library/clock.tcl | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c592c22..e17b025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-13 Kevin B. Kenny + + * library/clock.n: Added a missing '--' on several [switch] + commands to improve performance of [clock format] and related + operations. [Feature Request 1182459] + 2005-04-13 Donal K. Fellows * doc/fcopy.n: Improved documentation on copying binary files, diff --git a/library/clock.tcl b/library/clock.tcl index d47429c..337ed5a 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.13 2004/12/29 20:57:28 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.14 2005/04/13 19:28:51 kennykb Exp $ # #---------------------------------------------------------------------- @@ -707,7 +707,7 @@ proc ::tcl::clock::format { args } { set state {} set retval {} foreach char [split $format {}] { - switch -exact $state { + switch -exact -- $state { {} { if { [string equal % $char] } { set state percent @@ -4411,7 +4411,7 @@ proc ::tcl::clock::GetJulianDayFromEraYearMonthDay { date } { # Get absolute year number from the civil year - switch -exact [dict get $date era] { + switch -exact -- [dict get $date era] { BCE { set year [expr { 1 - [dict get $date year] }] } @@ -4493,7 +4493,7 @@ proc ::tcl::clock::GetJulianDayFromEraYearDay { date } { # Get absolute year number from the civil year - switch -exact [dict get $date era] { + switch -exact -- [dict get $date era] { BCE { set year [expr { 1 - [dict get $date year] }] } -- cgit v0.12