From 7812f88acac01c74409abf958b60c294c658176a Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Fri, 28 Sep 2007 21:31:13 +0000 Subject: [PATCH] Some minor documentation and formatting fixes git-svn-id: file:///srv/devel/repo-conversion/nusu@53 d2e56fa2-650e-0410-a79f-9358c0239efd --- Source/Serialization/BinarySerializer.cs | 3 +-- Source/Tracking/ProgressionTracker.cs | 12 ++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Serialization/BinarySerializer.cs b/Source/Serialization/BinarySerializer.cs index 1b96085..bc3d518 100644 --- a/Source/Serialization/BinarySerializer.cs +++ b/Source/Serialization/BinarySerializer.cs @@ -254,7 +254,7 @@ namespace Nuclex.Support.Serialization { CurveContinuity continuity = (CurveContinuity)reader.ReadByte(); curve.Keys.Add(new CurveKey(position, value, tangentIn, tangentOut, continuity)); - } + } } /// Serializes a curve into a binary data stream @@ -280,7 +280,6 @@ namespace Nuclex.Support.Serialization { } #endregion // Microsoft.Xna.Framework.Curve - } // class BinarySerializer diff --git a/Source/Tracking/ProgressionTracker.cs b/Source/Tracking/ProgressionTracker.cs index e04316a..496ba5a 100644 --- a/Source/Tracking/ProgressionTracker.cs +++ b/Source/Tracking/ProgressionTracker.cs @@ -139,15 +139,16 @@ namespace Nuclex.Support.Tracking { // Construct a new observation wrapper. This is done inside the lock // because as soon as we are subscribed to the events, we can potentially - // receive them. This would otherwise risk processing a progress update + // receive them. The lock eliminates the risk of processing a progress update // before the progression has been added to the tracked progressions list. if(progression.Ended) { // If the ended progression would become the only progression in the list, - // there's no sense in doing anything at all because it would have to - // be thrown right out again + // there's no sense in doing anything at all because it would have to be + // thrown right out again. So only add the progression if it hasn't ended yet. if(!wasEmpty) { + // Add the progression into our tracked progressions list. this.trackedProgressions.Add( new ObservedWeightedProgression( new WeightedProgression(progression, weight), @@ -164,6 +165,8 @@ namespace Nuclex.Support.Tracking { } else { // Progression is still running + // Construct a new progression observer and add the progression to our + // list of tracked progressions. ObservedWeightedProgression observedProgression = new ObservedWeightedProgression( new WeightedProgression(progression, weight), @@ -184,7 +187,8 @@ namespace Nuclex.Support.Tracking { // The progression might have ended before we had registered to its AsyncEnded // event, so we have to do this to be on the safe side. This might cause - // asyncEnded() to be called twice, but that's not a problem at all. + // asyncEnded() to be called twice, but that's not a problem in this + // implementation and was accepted for performance reasons. if(progression.Ended) { asyncEnded(); observedProgression.Dispose();