Mercurial > repos > IBBoard
changeset 50:e98708559618
Re #24: Add "limit" objects that can be used for numeric limits
* Fix overrides
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 11 Oct 2009 19:58:02 +0000 |
parents | a177a3750acd |
children | c3b217a708f4 |
files | Limits/NumericSizeConstrainedLimit.cs Limits/SimpleRoundedPercentageLimit.cs |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Limits/NumericSizeConstrainedLimit.cs Wed Oct 07 18:40:09 2009 +0000 +++ b/Limits/NumericSizeConstrainedLimit.cs Sun Oct 11 19:58:02 2009 +0000 @@ -24,7 +24,7 @@ /// <returns> /// <code>size</code> or the numeric limit this object was created with, whichever is smaller. /// </returns> - public int GetLimit(int size) + public override int GetLimit(int size) { return (int)Math.Min(size, Limit); }
--- a/Limits/SimpleRoundedPercentageLimit.cs Wed Oct 07 18:40:09 2009 +0000 +++ b/Limits/SimpleRoundedPercentageLimit.cs Sun Oct 11 19:58:02 2009 +0000 @@ -28,7 +28,7 @@ /// <returns> /// <code>size</code> or the numeric limit this object was created with, whichever is smaller. /// </returns> - public int GetLimit(int size) + public override int GetLimit(int size) { return (int)IBBMath.Round(size * Limit / 100, roundUp); }