From df93eb736d78bb94bd2b1b36fb406bdff8abdeb9 Mon Sep 17 00:00:00 2001 From: mdb Date: Wed, 17 Apr 2002 02:10:18 +0000 Subject: [PATCH] Aiya. Fixed bug in removing elements from set. git-svn-id: https://samskivert.googlecode.com/svn/trunk@707 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/ArrayIntSet.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java index 7831d3a2..6debb363 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java +++ b/projects/samskivert/src/java/com/samskivert/util/ArrayIntSet.java @@ -1,5 +1,5 @@ // -// $Id: ArrayIntSet.java,v 1.2 2002/04/17 00:19:41 mdb Exp $ +// $Id: ArrayIntSet.java,v 1.3 2002/04/17 02:10:18 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -145,8 +145,7 @@ public class ArrayIntSet extends AbstractSet // shift and insert if (_size > index) { - System.arraycopy(source, index, - _values, index+1, _size-index); + System.arraycopy(source, index, _values, index+1, _size-index); } _values[index] = value; @@ -185,7 +184,7 @@ public class ArrayIntSet extends AbstractSet { int index = binarySearch(value); if (index > 0) { - System.arraycopy(_values, index, _values, index+1, --_size-index); + System.arraycopy(_values, index+1, _values, index, --_size-index); _values[_size] = 0; return true; }