Bläddra i källkod

Rename Similarity to SimilarityDistance to avoid future inverted logic bugs.

git-svn-id: file:///var/svn/tigccpp/trunk@863 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 18 år sedan
förälder
incheckning
16cc267c5f
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      tigcc/ide/CodeCompletion/CompletionForm.pas

+ 3 - 3
tigcc/ide/CodeCompletion/CompletionForm.pas

@@ -286,7 +286,7 @@ begin
 end;
 
 function TCompForm.ShowSymbolInfo(Symbol: string = ''): Boolean;
-	function Similarity(const A, B: string): Integer;
+	function SimilarityDistance(const A, B: string): Integer;
 	var
 		i, l: Integer;
 	begin
@@ -301,7 +301,7 @@ function TCompForm.ShowSymbolInfo(Symbol: string = ''): Boolean;
 		l: Integer;
 	begin
 		l := Min(Length(A), Length(B));
-		Result := Similarity(A, B) < (l shr 1);
+		Result := SimilarityDistance(A, B) < (l shr 1);
 	end;
 var
 	M: TMemoComponent;
@@ -340,7 +340,7 @@ begin
 			end
 			else
 			begin
-				if Similarity(Symbol, List[i - 1]) < Similarity(Symbol, List[i]) then
+				if SimilarityDistance(Symbol, List[i - 1]) < SimilarityDistance(Symbol, List[i]) then
 					Dec(i);
 				if Similar(Symbol, List[i]) then
 					T := List[i] + ' ?'#13#10