lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f7ad61c 2/2: Forestall a defect reported in p


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f7ad61c 2/2: Forestall a defect reported in production [350]
Date: Sun, 2 Jun 2019 18:32:14 -0400 (EDT)

branch: master
commit f7ad61cb5b70d0cc71ff8d0b0639a3978e04a03a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Forestall a defect reported in production [350]
    
    The reproducible test case here:
      https://lists.nongnu.org/archive/html/lmi/2019-05/msg00010.html
    now results in a composite PDF with no supplemental report.
---
 ledger_invariant.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 3513227..c382174 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -752,10 +752,13 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant 
const& a_Addend)
 
     WriteTsvFile  = WriteTsvFile  || a_Addend.WriteTsvFile ;
 
-    // TODO ?? This doesn't seem quite right, but what would be better?
-    // We can't take the union of all columns selected for any life,
-    // because its cardinality might exceed the maximum.
-    SupplementalReport  = SupplementalReport || a_Addend.SupplementalReport;
+    // The composite has a supplemental report iff every cell has one,
+    // in which case it uses the same columns as the last cell. There
+    // is no better general way to decide which columns to use. (The
+    // union of all columns selected for any life becomes infeasible
+    // when its cardinality exceeds the maximum.)
+    //
+    SupplementalReport = SupplementalReport && a_Addend.SupplementalReport;
     SupplementalReportColumn00 = a_Addend.SupplementalReportColumn00;
     SupplementalReportColumn01 = a_Addend.SupplementalReportColumn01;
     SupplementalReportColumn02 = a_Addend.SupplementalReportColumn02;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]