+1
Completed

False positive W521 when returning a record

dummzeuch 10 years ago updated by Roman 10 years ago 4
We have many functions that look like this:

function TQuerEbenheit_EA_Daten.Abscissa: TAbscissa;
begin
Result.AssignKm(Messkm);
end;

TAbscissa is an extended record with mutliple AssingXxx methods that initialize its value. So the result is actually initialized. I haven't got a good idea how to solve this. Maybe instead of an AsssignXxx method I should change this to a constructor call with an assignment?

Result := TAbscissa.CreateFromKm(Messkm);

But that would add the overhead of creating an additional record and assigning it to result. Not much of an overhead. The problem is more that we would have to rewrite lots of code.
Under review
I will fix this in the next release.