lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [31/37] lucenenet git commit: Lucene.Net.Codecs: Renamed all parameter names camelCase
Date Sun, 29 Jan 2017 13:27:53 GMT
Lucene.Net.Codecs: Renamed all parameter names camelCase


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

Branch: refs/heads/api-work
Commit: c0908b4ed790d31ddc6d666c9d988e226896feb2
Parents: 7660509
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 17:38:35 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 17:38:35 2017 +0700

----------------------------------------------------------------------
 .../Pulsing/PulsingPostingsReader.cs            | 64 ++++++++++----------
 .../Pulsing/PulsingPostingsWriter.cs            | 18 +++---
 src/Lucene.Net.Codecs/RectangularArrays.cs      | 12 ++--
 3 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 7f64fab..8f776bc 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -160,64 +160,64 @@ namespace Lucene.Net.Codecs.Pulsing
             return new PulsingTermState {WrappedTermState = _wrappedPostingsReader.NewTermState()};
         }
 
-        public override void DecodeTerm(long[] empty, DataInput input, FieldInfo fieldInfo,
BlockTermState _termState,
+        public override void DecodeTerm(long[] empty, DataInput input, FieldInfo fieldInfo,
BlockTermState termState,
             bool absolute)
         {
-            var termState = (PulsingTermState) _termState;
+            var termState2 = (PulsingTermState) termState;
 
             Debug.Assert(empty.Length == 0);
 
-            termState.Absolute = termState.Absolute || absolute;
+            termState2.Absolute = termState2.Absolute || absolute;
             // if we have positions, its total TF, otherwise its computed based on docFreq.
             // TODO Double check this is right..
             long count = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS.CompareTo(fieldInfo.IndexOptions)
<= 0
-                ? termState.TotalTermFreq
-                : termState.DocFreq;
+                ? termState2.TotalTermFreq
+                : termState2.DocFreq;
            
             if (count <= _maxPositions)
             {
                 // Inlined into terms dict -- just read the byte[] blob in,
                 // but don't decode it now (we only decode when a DocsEnum
                 // or D&PEnum is pulled):
-                termState.PostingsSize = input.ReadVInt();
-                if (termState.Postings == null || termState.Postings.Length < termState.PostingsSize)
+                termState2.PostingsSize = input.ReadVInt();
+                if (termState2.Postings == null || termState2.Postings.Length < termState2.PostingsSize)
                 {
-                    termState.Postings = new byte[ArrayUtil.Oversize(termState.PostingsSize,
1)];
+                    termState2.Postings = new byte[ArrayUtil.Oversize(termState2.PostingsSize,
1)];
                 }
                 // TODO: sort of silly to copy from one big byte[]
                 // (the blob holding all inlined terms' blobs for
                 // current term block) into another byte[] (just the
                 // blob for this term)...
-                input.ReadBytes(termState.Postings, 0, termState.PostingsSize);
+                input.ReadBytes(termState2.Postings, 0, termState2.PostingsSize);
                 //System.out.println("  inlined bytes=" + termState.postingsSize);
-                termState.Absolute = termState.Absolute || absolute;
+                termState2.Absolute = termState2.Absolute || absolute;
             }
             else
             {
                 var longsSize = _fields == null ? 0 : _fields[fieldInfo.Number];
-                if (termState.Longs == null)
+                if (termState2.Longs == null)
                 {
-                    termState.Longs = new long[longsSize];
+                    termState2.Longs = new long[longsSize];
                 }
                 for (var i = 0; i < longsSize; i++)
                 {
-                    termState.Longs[i] = input.ReadVLong();
+                    termState2.Longs[i] = input.ReadVLong();
                 }
-                termState.PostingsSize = -1;
-                termState.WrappedTermState.DocFreq = termState.DocFreq;
-                termState.WrappedTermState.TotalTermFreq = termState.TotalTermFreq;
-                _wrappedPostingsReader.DecodeTerm(termState.Longs, input, fieldInfo,
-                    termState.WrappedTermState,
-                    termState.Absolute);
-                termState.Absolute = false;
+                termState2.PostingsSize = -1;
+                termState2.WrappedTermState.DocFreq = termState2.DocFreq;
+                termState2.WrappedTermState.TotalTermFreq = termState2.TotalTermFreq;
+                _wrappedPostingsReader.DecodeTerm(termState2.Longs, input, fieldInfo,
+                    termState2.WrappedTermState,
+                    termState2.Absolute);
+                termState2.Absolute = false;
             }
         }
 
-        public override DocsEnum Docs(FieldInfo field, BlockTermState _termState, IBits liveDocs,
DocsEnum reuse,
+        public override DocsEnum Docs(FieldInfo field, BlockTermState termState, IBits liveDocs,
DocsEnum reuse,
             int flags)
         {
-            var termState = (PulsingTermState) _termState;
-            if (termState.PostingsSize != -1)
+            var termState2 = (PulsingTermState) termState;
+            if (termState2.PostingsSize != -1)
             {
                 PulsingDocsEnum postings;
                 if (reuse is PulsingDocsEnum)
@@ -245,27 +245,27 @@ namespace Lucene.Net.Codecs.Pulsing
                 if (reuse != postings)
                     SetOther(postings, reuse); // postings.other = reuse
                 
-                return postings.Reset(liveDocs, termState);
+                return postings.Reset(liveDocs, termState2);
             }
 
             if (!(reuse is PulsingDocsEnum))
-                return _wrappedPostingsReader.Docs(field, termState.WrappedTermState, liveDocs,
reuse, flags);
+                return _wrappedPostingsReader.Docs(field, termState2.WrappedTermState, liveDocs,
reuse, flags);
 
-            var wrapped = _wrappedPostingsReader.Docs(field, termState.WrappedTermState,
liveDocs,
+            var wrapped = _wrappedPostingsReader.Docs(field, termState2.WrappedTermState,
liveDocs,
                 GetOther(reuse), flags);
 
             SetOther(wrapped, reuse); // wrapped.other = reuse
             return wrapped;
         }
 
-        public override DocsAndPositionsEnum DocsAndPositions(FieldInfo field, BlockTermState
_termState, IBits liveDocs,
+        public override DocsAndPositionsEnum DocsAndPositions(FieldInfo field, BlockTermState
termState, IBits liveDocs,
             DocsAndPositionsEnum reuse,
             int flags)
         {
 
-            var termState = (PulsingTermState) _termState;
+            var termState2 = (PulsingTermState) termState;
 
-            if (termState.PostingsSize != -1)
+            if (termState2.PostingsSize != -1)
             {
                 PulsingDocsAndPositionsEnum postings;
                 if (reuse is PulsingDocsAndPositionsEnum)
@@ -293,15 +293,15 @@ namespace Lucene.Net.Codecs.Pulsing
                 {
                     SetOther(postings, reuse); // postings.other = reuse 
                 }
-                return postings.Reset(liveDocs, termState);
+                return postings.Reset(liveDocs, termState2);
             }
 
             if (!(reuse is PulsingDocsAndPositionsEnum))
-                return _wrappedPostingsReader.DocsAndPositions(field, termState.WrappedTermState,
liveDocs, reuse,
+                return _wrappedPostingsReader.DocsAndPositions(field, termState2.WrappedTermState,
liveDocs, reuse,
                     flags);
 
             var wrapped = _wrappedPostingsReader.DocsAndPositions(field,
-                termState.WrappedTermState,
+                termState2.WrappedTermState,
                 liveDocs, (DocsAndPositionsEnum) GetOther(reuse),
                 flags);
             SetOther(wrapped, reuse); // wrapped.other = reuse

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index 3b1aa77..ac443f6 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -260,19 +260,19 @@ namespace Lucene.Net.Codecs.Pulsing
         /// <summary>
         /// Called when we are done adding docs to this term
         /// </summary>
-        /// <param name="_state"></param>
-        public override void FinishTerm(BlockTermState _state)
+        /// <param name="state"></param>
+        public override void FinishTerm(BlockTermState state)
         {
-            var state = (PulsingTermState) _state;
+            var state2 = (PulsingTermState) state;
 
             Debug.Assert(_pendingCount > 0 || _pendingCount == -1);
 
             if (_pendingCount == -1)
             {
-                state.wrappedState.DocFreq = state.DocFreq;
-                state.wrappedState.TotalTermFreq = state.TotalTermFreq;
-                state.bytes = null;
-                _wrappedPostingsWriter.FinishTerm(state.wrappedState);
+                state2.wrappedState.DocFreq = state2.DocFreq;
+                state2.wrappedState.TotalTermFreq = state2.TotalTermFreq;
+                state2.bytes = null;
+                _wrappedPostingsWriter.FinishTerm(state2.wrappedState);
             }
             else
             {
@@ -403,8 +403,8 @@ namespace Lucene.Net.Codecs.Pulsing
                         break;
                 }
 
-                state.bytes = new byte[(int) _buffer.FilePointer];
-                _buffer.WriteTo(state.bytes, 0);
+                state2.bytes = new byte[(int) _buffer.FilePointer];
+                _buffer.WriteTo(state2.bytes, 0);
                 _buffer.Reset();
             }
             _pendingCount = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/RectangularArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/RectangularArrays.cs b/src/Lucene.Net.Codecs/RectangularArrays.cs
index 476fc1b..d98e410 100644
--- a/src/Lucene.Net.Codecs/RectangularArrays.cs
+++ b/src/Lucene.Net.Codecs/RectangularArrays.cs
@@ -7,17 +7,17 @@
 //----------------------------------------------------------------------------------------
 internal static partial class RectangularArrays // LUCENENET TODO: Move to Support ?
 {
-    internal static long[][] ReturnRectangularLongArray(int Size1, int Size2)
+    internal static long[][] ReturnRectangularLongArray(int size1, int size2)
     {
         long[][] Array;
-        if (Size1 > -1)
+        if (size1 > -1)
         {
-            Array = new long[Size1][];
-            if (Size2 > -1)
+            Array = new long[size1][];
+            if (size2 > -1)
             {
-                for (int Array1 = 0; Array1 < Size1; Array1++)
+                for (int Array1 = 0; Array1 < size1; Array1++)
                 {
-                    Array[Array1] = new long[Size2];
+                    Array[Array1] = new long[size2];
                 }
             }
         }


Mime
View raw message