Skip to content

Conversation

JPeterMugaas
Copy link
Contributor

@JPeterMugaas JPeterMugaas commented Nov 21, 2024

…een the "unit" and "interface" for good measure

…een the "unit" and "interface" for good measure

Remove some unneeded unit dependencies.
@rlebeau rlebeau added Type: Enhancement Issue is proposing a new feature/enhancement Element: Compiler/IDE Issues related to a particular Compiler and/or IDE Status: Review Needed Issue needs further review to decide next status labels Nov 21, 2024
@JPeterMugaas
Copy link
Contributor Author

JPeterMugaas commented Nov 21, 2024

I moved the IdCompilerDefines.inc to between the "unit" and "imterface" declarations because of this:

From the Free Pascal Conversion Guide:
https://wiki.lazarus.freepascal.org/Code_Conversion_Guide

Most Delphi units can be compiled by the Free Pascal compiler by adding:

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

right after the unit name.

@rlebeau
Copy link
Member

rlebeau commented Nov 22, 2024

Where the IdCompilerDefines.inc references are located right now is fine, they have worked fine for years without problem. They don't need to be moved:

https://www.freepascal.org/docs-html/user/userse33.html

The MODE directive should always be located before the uses clause of the unit interface or program uses clause, because setting the mode may result in the loading of an additional unit as the first unit to be loaded.

Moving the .inc references above the interface block doesn't offer any real benefit, only minor code cleanup. I'm already doing some other code cleanups in Indy 11, so I would defer such a big change until then.

But, removing unused unit references is good. I have incorporated those changes now.

@rlebeau rlebeau added this to the Indy 11 - Maintenance Release milestone Nov 22, 2024
@rlebeau rlebeau added Status: Deferred Issue to be re-reviewed in a future release and removed Status: Review Needed Issue needs further review to decide next status labels Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Element: Compiler/IDE Issues related to a particular Compiler and/or IDE Status: Deferred Issue to be re-reviewed in a future release Type: Enhancement Issue is proposing a new feature/enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants