Actually, ignore the part about the 1 >= m_buffer.Length. On second reading
that's fine ;)

Alan.

On Mon, Jan 11, 2010 at 11:24 PM, Alan McGovern <alan.mcgov...@gmail.com>wrote:

> Hey,
>
> This patch does three things:
>
> 1) Optimises away some allocations - good
> 2) Added extra checks which throw exceptions - without providing testcases
> - bad
> 3) A fair few whitespace changes - bad
>
> Would you be able to submit two patches instead? The first should do the
> optimisation, the second should add the test+exception for CanRead and
> CanWrite as well as adding some nunit test cases which show that this is
> required.
>
> Also:
>
> +                             if (1 >= m_buffer.Length) {
> +                                     return m_stream.ReadByte ();
>
> That should really be: if m_buffer.Length == 0 as the case where the Length
> is >= 0 is already handled. It makes things easier to understand.
>
> Thanks,
> Alan.
>
> On Mon, Jan 11, 2010 at 10:53 PM, Tom Philpot <tom.phil...@logos.com>wrote:
>
>> Sorry, for double posting this patch. Snow Leopard's Mail.app w/ Exchange
>> support turned my "This is contributed under the MIT/X11 license" into an
>> attachment.
>>
>> For the record, the code in this patch is contributed under the MIT/X11
>> license
>>
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to