Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 20, 2010
1 parent dfe1d94 commit d3b6d1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/MongoDB/DatabaseJavascript.cs
Expand Up @@ -91,12 +91,12 @@ public bool Contains(Document item)
/// </exception>
public void CopyTo(Document[] array, int arrayIndex)
{
var query = new Document().Add("$orderby", new Document().Add("_id", 1));
var idx = arrayIndex;
foreach(var doc in _collection.Find(query, array.Length - 1, arrayIndex).Documents)
var query = new Document("$orderby", new Document("_id", 1));
var index = arrayIndex;
foreach(var document in _collection.Find(query, array.Length - 1, arrayIndex).Documents)
{
array[idx] = doc;
idx++;
array[index] = document;
index++;
}
}

Expand Down

0 comments on commit d3b6d1d

Please sign in to comment.