Why on earth?
-
Would someone do this:
public IEnumerable> GetTaggedSpans(SnapshotSpan span)
{
IList> source = new List>(this._trackingTagSpans); // this
lock (this.mutex)
{
source = new List>(this._trackingTagSpans); // and then this, WTF?
}
return
from tagSpan in source
where span.IntersectsWith(tagSpan.Span.GetSpan(span.Snapshot))
select tagSpan;
}This is from a builtin class (
SimpleTagger<T>
) in the Visual Studio SDK. Edit: Looks like I upset a Microsoftie. Instead of downvoting, go fix the f#@kin crap code buddy. -
Would someone do this:
public IEnumerable> GetTaggedSpans(SnapshotSpan span)
{
IList> source = new List>(this._trackingTagSpans); // this
lock (this.mutex)
{
source = new List>(this._trackingTagSpans); // and then this, WTF?
}
return
from tagSpan in source
where span.IntersectsWith(tagSpan.Span.GetSpan(span.Snapshot))
select tagSpan;
}This is from a builtin class (
SimpleTagger<T>
) in the Visual Studio SDK. Edit: Looks like I upset a Microsoftie. Instead of downvoting, go fix the f#@kin crap code buddy.This guy had his head full of coffee (or other drugs, can't say exactly) Maybe the code where longer before and was shortened to this :doh:
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
-
Would someone do this:
public IEnumerable> GetTaggedSpans(SnapshotSpan span)
{
IList> source = new List>(this._trackingTagSpans); // this
lock (this.mutex)
{
source = new List>(this._trackingTagSpans); // and then this, WTF?
}
return
from tagSpan in source
where span.IntersectsWith(tagSpan.Span.GetSpan(span.Snapshot))
select tagSpan;
}This is from a builtin class (
SimpleTagger<T>
) in the Visual Studio SDK. Edit: Looks like I upset a Microsoftie. Instead of downvoting, go fix the f#@kin crap code buddy.Would a simple error be a ground-breaking concept for you?
-
Would a simple error be a ground-breaking concept for you?
Vitaly Tomilov wrote:
Would a simple error be a ground-breaking concept for you?
What is that suppose to mean? :confused:
-
Vitaly Tomilov wrote:
Would a simple error be a ground-breaking concept for you?
What is that suppose to mean? :confused:
Looks like a simple error, which needs a simple fix.
-
Looks like a simple error, which needs a simple fix.
Vitaly Tomilov wrote:
Looks like a simple error, which needs a simple fix.
Firstly, simple error yes, but why is this not spotted a mile away? Secondly, this is not my code. It is Microsoft's production code, that lives in VS2010 and VS2012. It is up to them to fix such a simple error.