Skip to content

Commit

Permalink
Obj: use INT32_MAX for NA values
Browse files Browse the repository at this point in the history
  • Loading branch information
PMeira committed Feb 7, 2024
1 parent bfc892d commit 113c80e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CAPI/CAPI_Obj.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ procedure Batch_SetInt32Array(batch: TDSSObjectPtr; batchSize: Integer; Index: I
// Faster path
for i := 1 to batchSize do
begin
if (allowNA) or (Value^ <> $80000000) then
if (allowNA) or (Value^ <> $7fffffff) then
begin
// check for each element, in case the element is being edited somewhere else
singleEdit := not (Flg.EditingActive in batch^.Flags);
Expand All @@ -1738,7 +1738,7 @@ procedure Batch_SetInt32Array(batch: TDSSObjectPtr; batchSize: Integer; Index: I

for i := 1 to batchSize do
begin
if (allowNA) or (Value^ <> $80000000) then
if (allowNA) or (Value^ <> $7fffffff) then
batch^.SetInteger(Index, Value^, setterFlags);
inc(batch);
inc(Value)
Expand Down
2 changes: 1 addition & 1 deletion src/Common/DSSClass.pas
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface
// for other components if we think it fits.
AvoidFullRecalc = 1,

// For batch operations, skip NA values -- values of NaN for float64, INT32_MIN (0x80000000) for int32, null pointers for strings.
// For batch operations, skip NA values -- values of NaN for float64, INT32_MAX (0x7fffffff) for int32, null pointers for strings.
SkipNA = 2,

Reserved3 = 3,
Expand Down

0 comments on commit 113c80e

Please sign in to comment.