To play it really safe, one would like to do something like this:
function TopazGetText(const _s: string): string;
begin
{$IFOPT <something>+}
{$DEFINE HINTS_WERE_ON}
{$HINTS OFF}
{$ELSE}
{$UNDEF HINTS_WERE_ON}
{$ENDIF}
Result := dzDGetText(_s, TOPAZ_TRANSLATION_DOMAIN);
{$IFDEF HINTS_WERE_ON}
{$HINTS ON}
{$ENDIF}
end;
Unfortunately there seems to be no compiler directive for checking whether hints are off or not, so you can't do this. (H+ is not for hints but for long strings).
Also, HINTS OFF / ON does not work within a function/procedure.
So you end up turning hints off and on unconditionally for the whole function:
{$HINTS OFF}
function TopazGetText(const _s: string): string;
begin
Result := dzDGetText(_s, TOPAZ_TRANSLATION_DOMAIN);
end;
{$HINTS ON}
(The compiler used to tell me that it could not inline dzDGetText which is something I don't care about in this case and I don't want to see the hint because this would stop me (and my coworkers) to care about important hints.)