lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [13/50] [abbrv] lucenenet git commit: Lucene.Net.Core.Util.PriorityQueue refactor: changed GetHeapArray() > HeapArray (writable property)
Date Sun, 05 Mar 2017 11:48:52 GMT
Lucene.Net.Core.Util.PriorityQueue refactor: changed GetHeapArray() > HeapArray (writable
property)


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

Branch: refs/heads/api-work
Commit: d38efd39b554ca38b2cac8e467695695526e4a65
Parents: 5704f3b
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Mar 3 10:52:02 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Mar 5 17:08:33 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/PriorityQueue.cs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d38efd39/src/Lucene.Net.Core/Util/PriorityQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/PriorityQueue.cs b/src/Lucene.Net.Core/Util/PriorityQueue.cs
index 5ad6426..0f1a070 100644
--- a/src/Lucene.Net.Core/Util/PriorityQueue.cs
+++ b/src/Lucene.Net.Core/Util/PriorityQueue.cs
@@ -1,4 +1,6 @@
 using System;
+using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util
 {
@@ -309,9 +311,11 @@ namespace Lucene.Net.Util
         /// this method returns the internal heap array as T[].
         /// @lucene.internal
         /// </summary>
-        protected T[] GetHeapArray() // LUCENENET TODO: Change to HeapArray property (writable)
+        [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design
requires some writable array properties")]
+        protected T[] HeapArray
         {
-            return heap;
+            get { return heap; }
         }
     }
 }
\ No newline at end of file


Mime
View raw message