Browse Source

* simplified the GetValue nested procedure inside TWatch.Get_new_value

git-svn-id: trunk@30119 -
nickysn 10 years ago
parent
commit
7b6e649714
1 changed files with 3 additions and 11 deletions
  1. 3 11
      ide/fpdebug.pas

+ 3 - 11
ide/fpdebug.pas

@@ -2876,17 +2876,9 @@ procedure TWatch.Get_new_value;
     function GetValue(var s : AnsiString) : boolean;
       begin
         s:=Debugger^.PrintCommand(s);
-        if not Debugger^.Error then
-          begin
-            GetValue:=true;
-          end
-        else
-          begin
-            // Is always done now s:=StrPas(Debugger^.GetError);
-            GetValue:=false;
-            { do not open a messagebox for such errors }
-            Debugger^.got_error:=false;
-          end;
+        GetValue := not Debugger^.Error;
+        { do not open a messagebox for such errors }
+        Debugger^.got_error:=false;
       end;
 
   begin