lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [46/50] [abbrv] git commit: Some bug fixes
Date Tue, 24 Sep 2013 18:33:22 GMT
Some bug fixes


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/86087f1d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/86087f1d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/86087f1d

Branch: refs/heads/branch_4x
Commit: 86087f1da88609097e60dc4f11aec342eeb4f8e3
Parents: c188376
Author: Paul Irwin <paulirwin@gmail.com>
Authored: Fri Aug 9 15:39:15 2013 -0400
Committer: Paul Irwin <paulirwin@gmail.com>
Committed: Fri Aug 9 15:39:15 2013 -0400

----------------------------------------------------------------------
 src/core/Store/BufferedIndexOutput.cs |  2 +-
 src/core/Util/Fst/BytesStore.cs       | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/86087f1d/src/core/Store/BufferedIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/core/Store/BufferedIndexOutput.cs b/src/core/Store/BufferedIndexOutput.cs
index 8c9c96f..8ebbb90 100644
--- a/src/core/Store/BufferedIndexOutput.cs
+++ b/src/core/Store/BufferedIndexOutput.cs
@@ -96,7 +96,7 @@ namespace Lucene.Net.Store
                     while (pos < length)
                     {
                         pieceLength = (length - pos < bytesLeft) ? length - pos : bytesLeft;
-                        Array.Copy(b, pos + offset, buffer, bufferPosition, pieceLength);
+                        Buffer.BlockCopy(b, pos + offset, buffer, bufferPosition, pieceLength);
                         pos += pieceLength;
                         bufferPosition += pieceLength;
                         // if the buffer is full, flush it

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/86087f1d/src/core/Util/Fst/BytesStore.cs
----------------------------------------------------------------------
diff --git a/src/core/Util/Fst/BytesStore.cs b/src/core/Util/Fst/BytesStore.cs
index ba1c6ce..d441a9b 100644
--- a/src/core/Util/Fst/BytesStore.cs
+++ b/src/core/Util/Fst/BytesStore.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Util.Fst
                 var chunk = blockSize - nextWrite;
                 if (len <= chunk)
                 {
-                    Array.Copy(b, offset, current, nextWrite, len);
+                    System.Buffer.BlockCopy(b, offset, current, nextWrite, len);
                     nextWrite += len;
                     break;
                 }
@@ -85,7 +85,7 @@ namespace Lucene.Net.Util.Fst
                 {
                     if (chunk > 0)
                     {
-                        Array.Copy(b, offset, current, nextWrite, chunk);
+                        System.Buffer.BlockCopy(b, offset, current, nextWrite, chunk);
                         offset += chunk;
                         len -= chunk;
                     }
@@ -121,13 +121,13 @@ namespace Lucene.Net.Util.Fst
             {
                 if (len <= downTo)
                 {
-                    Array.Copy(b, offset, block, downTo - len, len);
+                    System.Buffer.BlockCopy(b, offset, block, downTo - len, len);
                     break;
                 }
                 else
                 {
                     len -= downTo;
-                    Array.Copy(b, offset + len, block, 0, downTo);
+                    System.Buffer.BlockCopy(b, offset + len, block, 0, downTo);
                     blockIndex--;
                     block = blocks[blockIndex];
                     downTo = blockSize;
@@ -282,7 +282,7 @@ namespace Lucene.Net.Util.Fst
             if (current != null)
             {
                 var lastBuffer = new sbyte[nextWrite];
-                Array.Copy(current, 0, lastBuffer, 0, nextWrite);
+                System.Buffer.BlockCopy(current, 0, lastBuffer, 0, nextWrite);
                 blocks[blocks.Count - 1] = lastBuffer;
                 current = null;
             }
@@ -332,7 +332,7 @@ namespace Lucene.Net.Util.Fst
                     var chunkLeft = _parent.blockSize - nextRead;
                     if (len <= chunkLeft)
                     {
-                        Array.Copy(current, nextRead, b, offset, len);
+                        System.Buffer.BlockCopy(current, nextRead, b, offset, len);
                         nextRead += len;
                         break;
                     }
@@ -340,7 +340,7 @@ namespace Lucene.Net.Util.Fst
                     {
                         if (chunkLeft > 0)
                         {
-                            Array.Copy(current, nextRead, b, offset, chunkLeft);
+                            System.Buffer.BlockCopy(current, nextRead, b, offset, chunkLeft);
                             offset += chunkLeft;
                             len -= chunkLeft;
                         }


Mime
View raw message