You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/03/14 12:48:04 UTC

[lucenenet] 03/04: Lucene.Net.Util.VirtualMethod: Removed unnecessary call to Convert.ToInt32()

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit e50e1812596cd3146e33d67efa2d293216f9f941
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Mar 12 17:38:54 2021 +0700

    Lucene.Net.Util.VirtualMethod: Removed unnecessary call to Convert.ToInt32()
---
 src/Lucene.Net/Util/VirtualMethod.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Lucene.Net/Util/VirtualMethod.cs b/src/Lucene.Net/Util/VirtualMethod.cs
index 464ef50..c294037 100644
--- a/src/Lucene.Net/Util/VirtualMethod.cs
+++ b/src/Lucene.Net/Util/VirtualMethod.cs
@@ -147,7 +147,7 @@ namespace Lucene.Net.Util
         public int GetImplementationDistance(Type subclazz)
         {
             // LUCENENET: Replaced WeakIdentityMap with ConditionalWeakTable - This operation is simplified over Lucene.
-            return cache.GetValue(subclazz, (key) => Convert.ToInt32(ReflectImplementationDistance(key), CultureInfo.InvariantCulture));
+            return cache.GetValue(subclazz, (key) => ReflectImplementationDistance(key));
         }
 
         /// <summary>