Permalink
Browse files

Remove unused method param, consolidate methods

  • Loading branch information...
1 parent d7b3453 commit e577bab28e5981078d077d6163dbb2a5590781ed @niik niik committed with paulcbetts Mar 31, 2013
Showing with 3 additions and 9 deletions.
  1. +3 −9 ReactiveUI/ReactiveCollectionMixins.cs
@@ -106,7 +106,7 @@ private void onItemChanged(TSource changedItem)
bool isIncluded = destinationIndex >= 0;
if (isIncluded && !shouldBeIncluded) {
- internalRemoveAt(sourceIndex, destinationIndex);
+ internalRemoveAt(destinationIndex);
} else if (!isIncluded && shouldBeIncluded) {
internalInsert(sourceIndex, selector(changedItem));
}
@@ -136,7 +136,7 @@ private void onItemChanged(TSource changedItem)
}
} else {
// The change is forcing us to reorder, implemented as a remove and insert.
- internalRemoveAt(sourceIndex, destinationIndex);
+ internalRemoveAt(destinationIndex);
internalInsert(sourceIndex, newItem);
}
}
@@ -283,13 +283,7 @@ private void internalInsert(int sourceIndex, int destinationIndex, TValue value)
base.Insert(destinationIndex, value);
}
- private void internalRemoveAt(int sourceIndex)
- {
- int destinationIndex = indexToSourceIndexMap.IndexOf(sourceIndex);
- internalRemoveAt(sourceIndex, destinationIndex);
- }
-
- private void internalRemoveAt(int sourceIndex, int destinationIndex)
+ private void internalRemoveAt(int destinationIndex)
{
indexToSourceIndexMap.RemoveAt(destinationIndex);
base.RemoveAt(destinationIndex);

0 comments on commit e577bab

Please sign in to comment.