Browse Source

* refactor: invert if condition and else statement (reducing the nesting level), because then terminates the function. No functional changes.

Nikolay Nikolov 1 year ago
parent
commit
0b3238bcd3
1 changed files with 3 additions and 6 deletions
  1. 3 6
      compiler/ogwasm.pas

+ 3 - 6
compiler/ogwasm.pas

@@ -4148,13 +4148,10 @@ implementation
                 case objreloc.typ of
                   RELOC_FUNCTION_INDEX_LEB:
                     begin
-                      if objsym.LinkingData.ExeFunctionIndex<>-1 then
-                        begin
-                          objsec.Data.seek(objreloc.DataOffset);
-                          WriteUleb5(objsec.Data,objsym.LinkingData.ExeFunctionIndex);
-                        end
-                      else
+                      if objsym.LinkingData.ExeFunctionIndex=-1 then
                         internalerror(2024010103);
+                      objsec.Data.seek(objreloc.DataOffset);
+                      WriteUleb5(objsec.Data,objsym.LinkingData.ExeFunctionIndex);
                     end;
                   else
                     Writeln('Symbol relocation not yet implemented! ', objreloc.typ);