diff --git a/src/u_ceproject.pas b/src/u_ceproject.pas index a4fb5dda..1cd04cb7 100644 --- a/src/u_ceproject.pas +++ b/src/u_ceproject.pas @@ -957,7 +957,7 @@ begin getprocInputHandler.removeProcess(TProcess(sender)); if proc is TDexedProcess then dproc := TDexedProcess(proc); - if (proc.ExitStatus <> 0) then + if not proc.ExitStatus.equals(0) then begin fMsgs.message(format('error: the process (%s) has returned the status %s', [proc.Executable, prettyReturnStatus(proc)]), fAsProjectItf, amcProj, amkErr); diff --git a/src/u_d2syn.pas b/src/u_d2syn.pas index e3e59517..8660314c 100644 --- a/src/u_d2syn.pas +++ b/src/u_d2syn.pas @@ -151,7 +151,7 @@ const begin result := inherited Compare(range); assert(range <> nil); - if result <> 0 then + if not result.equals(0) then exit; if range is TSynD2SynRange then diff --git a/src/u_dmdwrap.pas b/src/u_dmdwrap.pas index 2e45c927..52d43452 100644 --- a/src/u_dmdwrap.pas +++ b/src/u_dmdwrap.pas @@ -914,7 +914,7 @@ begin begin if fDebugConditions then list.Add('-debug'); - if fDbgLevel <> 0 then + if not fDbgLevel.equals(0) then list.Add('-debug=' + intToStr(fDbgLevel)); for idt in fDbgIdents do list.Add('-debug=' + idt); diff --git a/src/u_dubproject.pas b/src/u_dubproject.pas index d66fa293..102b515c 100644 --- a/src/u_dubproject.pas +++ b/src/u_dubproject.pas @@ -283,7 +283,7 @@ begin if not o.findAny('path', d) then continue; p := d.AsString; - if (p.length <> 0) and (p[p.length] <> DirectorySeparator) then + if not p.length.equals(0) and (p[p.length] <> DirectorySeparator) then p += DirectorySeparator; if DirectoryExistsUTF8(p) then loc.Add(p); @@ -1143,7 +1143,7 @@ begin begin fDubProc.Options := fDubProc.Options + [poWaitOnExit, poNewConsole]; end; - if fMetaEnv.Count <> 0 then + if not fMetaEnv.Count.equals(0) then begin for i := 0 to fMetaEnv.Count-1 do begin diff --git a/src/u_gdb.pas b/src/u_gdb.pas index 40219be0..7d4e6227 100644 --- a/src/u_gdb.pas +++ b/src/u_gdb.pas @@ -2050,7 +2050,7 @@ begin cpuViewer.TIObject := fInspState; cpuViewer.RefreshPropertyValues; // inferior options - if o.environmentPaths.Count <> 0 then + if not o.environmentPaths.Count.equals(0) then begin str := ''; for i:= 0 to o.environmentPaths.Count-1 do @@ -2060,7 +2060,7 @@ begin end; if DirectoryExists(fSyms.expand(o.workingDirectory)) then gdbCommand('-environment-cd ' + fSyms.expand(o.workingDirectory)); - if (o.arguments.Count <> 0) or (o.queryArguments) then + if not o.arguments.Count.equals(0) or o.queryArguments then begin str := ''; if o.queryArguments and not InputQuery('Command line arguments', 'GDB commander', str) then @@ -2462,7 +2462,7 @@ begin sigmean := 'unknown meaning'; if fJson.findAny('signal-name', val) then signame := val.AsString; - if (fOptions.ignoredSignals.Count <> 0) and + if not fOptions.ignoredSignals.Count.equals(0) and (fOptions.ignoredSignals.IndexOf(signame) <> -1) then begin continueDebugging; diff --git a/src/u_libmaneditor.pas b/src/u_libmaneditor.pas index 0ecee475..1ed90d74 100644 --- a/src/u_libmaneditor.pas +++ b/src/u_libmaneditor.pas @@ -488,7 +488,7 @@ begin finally dub.Free; end; - if err <> 0 then + if not err.equals(0) then begin itf.message('error, failed to fetch the package', nil, amcMisc, amkErr); exit; @@ -539,7 +539,7 @@ begin finally dub.Free; end; - if err <> 0 then + if not err.equals(0) then begin // allow "sourceLibrary" EntitiesConnector.beginUpdate; diff --git a/src/u_main.pas b/src/u_main.pas index dbd639de..d4889164 100644 --- a/src/u_main.pas +++ b/src/u_main.pas @@ -2963,7 +2963,7 @@ begin inph := EntitiesConnector.getSingleService('IProcInputHandler'); if inph.isNotNil then (inph as IProcInputHandler).removeProcess(proc); - if (proc.ExitStatus <> 0) then + if not proc.ExitStatus.equals(0) then begin fMsgs.message(format('error: the process (%s) has returned the status %s', [proc.Executable, prettyReturnStatus(proc)]), fDoc, amcEdit, amkErr); @@ -3095,7 +3095,7 @@ begin dmdproc.Parameters.Add('-of' + fname + objExt); dmdproc.Parameters.Add('-J' + fDoc.fileName.extractFilePath); dmdproc.Parameters.AddStrings(fRunnablesOptions.staticSwitches); - if lst.isNotNil and (lst.Count <> 0) then + if lst.isNotNil and not lst.Count.equals(0) then dmdproc.Parameters.AddStrings(lst); {$ifdef WINDOWS} {$ifdef CPUX86_64} diff --git a/src/u_profileviewer.pas b/src/u_profileviewer.pas index ade8190c..2d75cd06 100644 --- a/src/u_profileviewer.pas +++ b/src/u_profileviewer.pas @@ -539,7 +539,7 @@ begin begin Compare := AnsiCompareStr(item1.SubItems[3], item2.SubItems[3]); end - else if col <> 0 then + else if not col.equals(0) then begin i1 := item1.SubItems[col-1].ToInt64; i2 := item2.SubItems[col-1].ToInt64; diff --git a/src/u_shortcutseditor.pas b/src/u_shortcutseditor.pas index 00a484bb..6138bd5c 100644 --- a/src/u_shortcutseditor.pas +++ b/src/u_shortcutseditor.pas @@ -371,7 +371,7 @@ procedure TShortcutEditor.btnClearClick(Sender: TObject); begin if not anItemIsSelected then exit; - if TShortcutItem(tree.Selected.Data).data <> 0 then + if not TShortcutItem(tree.Selected.Data).data <> 0 then begin TShortcutItem(tree.Selected.Data).data := 0; fHasChanged := true; diff --git a/src/u_symstring.pas b/src/u_symstring.pas index fb11520f..34f6e61a 100644 --- a/src/u_symstring.pas +++ b/src/u_symstring.pas @@ -224,7 +224,7 @@ begin fSymbols[CPO] := fProjInterface.outputFilename; fSymbols[CPOP]:= fSymbols[CPO].extractFileDir; fSymbols[CPR] := fSymbols[CPP]; - if fProjInterface.sourcesCount <> 0 then + if not fProjInterface.sourcesCount.equals(0) then begin str := TStringList.Create; try diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index c693396b..acfd676c 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -1040,7 +1040,7 @@ end; procedure TScrollMemo.goToLine(value: integer); begin - if fMemo.PaintLock <> 0 then + if not fMemo.PaintLock.equals(0) then exit; if value > fMemo.Lines.Count then value := fMemo.Lines.Count @@ -1702,7 +1702,7 @@ begin t += byte(result = imTabs); s += byte(result = imSpaces); end; - if (t <> 0) and (s <> 0) then + if not t.equals(0) and not s.equals(0) then result := imMixed else if t.equals(0) then result := imSpaces diff --git a/src/u_tools.pas b/src/u_tools.pas index 8f168cca..797399db 100644 --- a/src/u_tools.pas +++ b/src/u_tools.pas @@ -292,7 +292,7 @@ begin if fTerminatedFlag then exit; fTerminatedFlag := true; - if fProcess.ExitStatus <> 0 then + if not fProcess.ExitStatus.equals(0) then begin fMsgs.message(format('error: the tool (%s) has returned the status %s', [fProcess.Executable, prettyReturnStatus(fProcess)]), nil, amcMisc, amkErr);