Reputation: 419
I came here after having read this earlier question and its answers:
Compiler Hint: "Inline function '...' has not been expanded..."
I now understand what inlining and the compiler hint about it mean (thanks!), but I'd like to not see those hints, at least for now.
From Embarcadero help and similar, I have found this comment saying:
Note: You can disable these hints by turning off Inlining in Project->Options->Compiling
But my problem is, I don't want to disable inlining entirely! I want the compiler to inline where it can, but if it can't due to missing uses clauses, I don't want to be bothered by it.
Is this possible? I think you can't disable hints by type as you can warnings, and I can't think of other ways to do this, but does anyone have better ideas?
Oh, and it might be possible to put compiler directives to disable hints and then re-enable them in the code around every place where such hint comes, but after a Delphi update there may now be so many of them that I wouldn't want to be bothered by that, either (if I do that, than I could as well add the units to the uses
clause).
Upvotes: 1
Views: 700
Reputation: 612914
Hints cannot be disabled individually. You either disable them all, or you enable them all.
In my view, the best way to deal with this is to add the function's declaring unit to the uses
clause of the unit that uses the function.
Upvotes: 1