From d355b401d58e315310cb2888849fad01aa441f98 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 Aug 2023 18:03:01 +0200 Subject: [PATCH] We don't need the else block, the base class IsMatch already inspects the terms. --- ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs b/ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs index 08dd26406..dfb83fc69 100644 --- a/ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs +++ b/ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs @@ -74,12 +74,8 @@ namespace ICSharpCode.ILSpyX.Search break; } } - else - { - searchTermLiteralType = TypeCode.String; - searchTermLiteralValue = terms[0]; - } } + // Note: if searchTermLiteralType remains TypeCode.Empty, we'll do a substring search via base.IsMatch } public override void Search(PEFile module, CancellationToken cancellationToken)