mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-25 03:50:53 +02:00
Formatting, minor simplification.
This commit is contained in:
parent
d5596c80a9
commit
cd66ac596b
@ -1541,19 +1541,10 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=Option;
|
Result:=Option;
|
||||||
if (Result='') or (Result[1] in ['"','''']) then exit;
|
if (Result='') or (Result[1] in ['"','''']) then exit;
|
||||||
for i:=1 to length(Result) do begin
|
for i:=1 to length(Result) do
|
||||||
case Result[i] of
|
case Result[i] of
|
||||||
' ','''':
|
' ','''': exit(AnsiQuotedStr(Result,'"'));
|
||||||
begin
|
'"': exit(AnsiQuotedStr(Result,''''));
|
||||||
Result:=AnsiQuotedStr(Result,'"');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
'"':
|
|
||||||
begin
|
|
||||||
Result:=AnsiQuotedStr(Result,'''');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{
|
{
|
||||||
|
@ -2807,9 +2807,8 @@ procedure TBuildManager.SetBuildTarget(const TargetOS, TargetCPU,
|
|||||||
begin
|
begin
|
||||||
if OverrideLCLWidgetType<>'' then
|
if OverrideLCLWidgetType<>'' then
|
||||||
Result:=OverrideLCLWidgetType
|
Result:=OverrideLCLWidgetType
|
||||||
else if FBuildTarget<>nil then begin
|
else if FBuildTarget<>nil then
|
||||||
Result:=FBuildTarget.CompilerOptions.GetEffectiveLCLWidgetType
|
Result:=FBuildTarget.CompilerOptions.GetEffectiveLCLWidgetType
|
||||||
end
|
|
||||||
else
|
else
|
||||||
Result:='';
|
Result:='';
|
||||||
if (Result='') or (SysUtils.CompareText(Result,'default')=0) then
|
if (Result='') or (SysUtils.CompareText(Result,'default')=0) then
|
||||||
|
@ -475,7 +475,7 @@ type
|
|||||||
|
|
||||||
procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean); override;
|
procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean); override;
|
||||||
|
|
||||||
function MakeOptionsString(Flags: TCompilerCmdLineOptions): String; virtual;
|
function MakeOptionsString(Flags: TCompilerCmdLineOptions): String;
|
||||||
function GetSyntaxOptionsString(Kind: TPascalCompiler): string; virtual;
|
function GetSyntaxOptionsString(Kind: TPascalCompiler): string; virtual;
|
||||||
function CreatePPUFilename(const SourceFileName: string): string; override;
|
function CreatePPUFilename(const SourceFileName: string): string; override;
|
||||||
function CreateTargetFilename: string; override;
|
function CreateTargetFilename: string; override;
|
||||||
@ -653,7 +653,7 @@ function InheritedOptionsToCompilerParameters(
|
|||||||
Flags: TCompilerCmdLineOptions): string;
|
Flags: TCompilerCmdLineOptions): string;
|
||||||
function MergeLinkerOptions(const OldOptions, AddOptions: string): string;
|
function MergeLinkerOptions(const OldOptions, AddOptions: string): string;
|
||||||
function MergeCustomOptions(const OldOptions, AddOptions: string): string;
|
function MergeCustomOptions(const OldOptions, AddOptions: string): string;
|
||||||
function ConvertSearchPathToCmdLine(const switch, paths: String): String;
|
function ConvertSearchPathToCmdLine(const Switch, Paths: String): String;
|
||||||
function ConvertOptionsToCmdLine(const Switch, OptionStr: string): string;
|
function ConvertOptionsToCmdLine(const Switch, OptionStr: string): string;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -901,8 +901,7 @@ begin
|
|||||||
Result+=AddOptions;
|
Result+=AddOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ConvertSearchPathToCmdLine(
|
function ConvertSearchPathToCmdLine(const Switch, Paths: String): String;
|
||||||
const Switch, Paths: String): String;
|
|
||||||
var
|
var
|
||||||
StartPos: Integer;
|
StartPos: Integer;
|
||||||
l: Integer;
|
l: Integer;
|
||||||
@ -912,7 +911,6 @@ begin
|
|||||||
RaiseGDBException('ConvertSearchPathToCmdLine no Switch');
|
RaiseGDBException('ConvertSearchPathToCmdLine no Switch');
|
||||||
Result := '';
|
Result := '';
|
||||||
if (Paths = '') then exit;
|
if (Paths = '') then exit;
|
||||||
|
|
||||||
l:=length(Paths);
|
l:=length(Paths);
|
||||||
StartPos:=1;
|
StartPos:=1;
|
||||||
while StartPos<=l do begin
|
while StartPos<=l do begin
|
||||||
@ -929,9 +927,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ConvertOptionsToCmdLine(const Switch,
|
function ConvertOptionsToCmdLine(const Switch, OptionStr: string): string;
|
||||||
OptionStr: string): string;
|
var
|
||||||
var Startpos, EndPos: integer;
|
Startpos, EndPos: integer;
|
||||||
p: Integer;
|
p: Integer;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
@ -1011,8 +1009,7 @@ begin
|
|||||||
FTree:=Tree;
|
FTree:=Tree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCompilerMsgIDFlagsEnumerator.
|
function TCompilerMsgIDFlagsEnumerator.GetEnumerator: TCompilerMsgIDFlagsEnumerator;
|
||||||
GetEnumerator: TCompilerMsgIDFlagsEnumerator;
|
|
||||||
begin
|
begin
|
||||||
Result:=Self;
|
Result:=Self;
|
||||||
end;
|
end;
|
||||||
@ -3226,8 +3223,7 @@ begin
|
|||||||
Result := switches;
|
Result := switches;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBaseCompilerOptions.GetSyntaxOptionsString(Kind: TPascalCompiler
|
function TBaseCompilerOptions.GetSyntaxOptionsString(Kind: TPascalCompiler): string;
|
||||||
): string;
|
|
||||||
var
|
var
|
||||||
tempsw: String;
|
tempsw: String;
|
||||||
begin
|
begin
|
||||||
@ -3264,8 +3260,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBaseCompilerOptions.CreatePPUFilename(const SourceFileName: string
|
function TBaseCompilerOptions.CreatePPUFilename(const SourceFileName: string): string;
|
||||||
): string;
|
|
||||||
var
|
var
|
||||||
UnitOutDir: String;
|
UnitOutDir: String;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user