Browse Source

* Some cleanup of code by LaCak

git-svn-id: trunk@17705 -
michael 14 years ago
parent
commit
08689fe638
1 changed files with 5 additions and 16 deletions
  1. 5 16
      packages/fcl-db/src/base/bufdataset.pas

+ 5 - 16
packages/fcl-db/src/base/bufdataset.pas

@@ -1803,29 +1803,18 @@ begin
   if state = dsOldValue then
   if state = dsOldValue then
     begin
     begin
     if not GetActiveRecordUpdateBuffer then
     if not GetActiveRecordUpdateBuffer then
-      begin
-      // There is no old value available
-      result := false;
-      exit;
-      end;
-    currbuff := FUpdateBuffer[FCurrentUpdateBuffer].OldValuesBuffer;
+      Exit; // There is no old value available
+    CurrBuff := FUpdateBuffer[FCurrentUpdateBuffer].OldValuesBuffer;
     end
     end
   else
   else
     CurrBuff := GetCurrentBuffer;
     CurrBuff := GetCurrentBuffer;
 
 
-  if not assigned(CurrBuff) then
-    begin
-    result := false;
-    exit;
-    end;
+  if not assigned(CurrBuff) then Exit;
 
 
   If Field.Fieldno > 0 then // If = 0, then calculated field or something similar
   If Field.Fieldno > 0 then // If = 0, then calculated field or something similar
     begin
     begin
-    if GetFieldIsnull(pbyte(CurrBuff),Field.Fieldno-1) then
-      begin
-      result := false;
-      exit;
-      end;
+    if GetFieldIsNull(pbyte(CurrBuff),Field.FieldNo-1) then
+      Exit;
     if assigned(buffer) then
     if assigned(buffer) then
       begin
       begin
       inc(CurrBuff,FFieldBufPositions[Field.FieldNo-1]);
       inc(CurrBuff,FFieldBufPositions[Field.FieldNo-1]);