mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:59:17 +02:00
Converter: Add cthreads only if not added already.
git-svn-id: trunk@29162 -
This commit is contained in:
parent
5c4d059729
commit
ea6083c980
@ -634,9 +634,12 @@ function TUsedUnitsTool.AddThreadSupport: TModalResult;
|
|||||||
// AddUnitToSpecificUsesSection would insert cthreads in the beginning automatically
|
// AddUnitToSpecificUsesSection would insert cthreads in the beginning automatically
|
||||||
// It doesn't work with {$IFDEF UNIX} directive -> use UsesInsertPolicy.
|
// It doesn't work with {$IFDEF UNIX} directive -> use UsesInsertPolicy.
|
||||||
var
|
var
|
||||||
|
i: Integer;
|
||||||
OldPolicy: TUsesInsertPolicy;
|
OldPolicy: TUsesInsertPolicy;
|
||||||
begin
|
begin
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
|
if not ( fMainUsedUnits.fExistingUnits.Find('cthreads', i) or
|
||||||
|
fImplUsedUnits.fExistingUnits.Find('cthreads', i) ) then
|
||||||
with fCTLink do
|
with fCTLink do
|
||||||
try
|
try
|
||||||
OldPolicy:=SrcCache.BeautifyCodeOptions.UsesInsertPolicy;
|
OldPolicy:=SrcCache.BeautifyCodeOptions.UsesInsertPolicy;
|
||||||
|
Loading…
Reference in New Issue
Block a user