File tree 3 files changed +15
-12
lines changed
3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class function TJsonUtils.JsonFormat(const json : string) : string;
99
99
' {' ,' [' :
100
100
begin
101
101
LIndent := LIndent + INDENT;
102
- if json[i+1 ] in [ ' }' , ' ] ' ] then Result := Result + c
102
+ if ( json[i+1 ] = ' }' ) or (json[i+ 1 ] = ' ] ' ) then Result := Result + c
103
103
else Result := Result + c + sLineBreak + LIndent;
104
104
isEOL := True;
105
105
end ;
@@ -113,7 +113,7 @@ class function TJsonUtils.JsonFormat(const json : string) : string;
113
113
Delete(LIndent, 1 , Length(INDENT));
114
114
if not isEOL then Result := Result + sLineBreak ;
115
115
if (i<json.Length) and (json[i+1 ] = ' ,' ) then Result := Result + LIndent + c
116
- else if json[i-1 ] in [ ' { ' , ' [ ' ] then Result := Result + c + sLineBreak
116
+ else if ( json[i-1 ] = ' } ' ) or (json[i- 1 ] = ' ] ' ) then Result := Result + c + sLineBreak
117
117
else Result := Result + LIndent + c + sLineBreak ;
118
118
isEOL := True;
119
119
end ;
Original file line number Diff line number Diff line change @@ -244,11 +244,11 @@ function TSMTP.SendMail(aMail : TMailMessage) : Boolean;
244
244
Result := False;
245
245
SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil );
246
246
try
247
+ idattach := nil ;
248
+ mBody := nil ;
247
249
msg := TIdMessage.Create(nil );
248
250
try
249
251
// create mail msg
250
- idattach := nil ;
251
- mBody := nil ;
252
252
msg.From.Address := aMail.From;
253
253
if aMail.SenderName <> ' ' then msg.From.Name := aMail.SenderName;
254
254
msg.Subject := aMail.Subject;
Original file line number Diff line number Diff line change 21
21
***************************************************************************
22
22
}
23
23
24
- { $ifdef QUICK_WARNOFF}
25
- { $WARNINGS OFF}
26
- { $endif}
27
-
28
- { $ifdef QUICK_HINTSOFF}
29
- { $HINTS OFF}
30
- { $endif}
31
-
32
24
{ $ifdef FPC}
33
25
{ $MODE DELPHI}
34
26
183
175
{ .$DEFINE DEBUG_REDIS}
184
176
{ $ENDIF}
185
177
178
+ { .$DEFINE QUICK_HINTSOFF}
179
+ { .$DEFINE QUICK_WARNOFF}
180
+
181
+ { $ifdef QUICK_HINTSOFF}
182
+ { $HINTS OFF}
183
+ { $endif}
184
+
185
+ { $ifdef QUICK_WARNOFF}
186
+ { $WARNINGS OFF}
187
+ { $endif}
188
+
186
189
You can’t perform that action at this time.
0 commit comments