lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master eca1c31 3/5: Diagnose 7702 q table zero as a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master eca1c31 3/5: Diagnose 7702 q table zero as a problem
Date: Thu, 6 Jun 2019 08:24:17 -0400 (EDT)

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

    Diagnose 7702 q table zero as a problem
    
    Previously, the deliberately-invalid table number zero was silently
    skipped--i.e., treated as presumptively valid. It's a self-limiting
    problem, because it prevents generating an illustration. However,
    just such a latent problem has existed in production for almost two
    decades. Now the product verifier identifies it.
---
 verify_products.cpp | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/verify_products.cpp b/verify_products.cpp
index ab3213e..86b9524 100644
--- a/verify_products.cpp
+++ b/verify_products.cpp
@@ -62,12 +62,22 @@ void verify_one_cell
     auto const t      = db.query<int             >(DB_Irc7702QTable);
     auto const axis_g = db.query<bool            >(DB_Irc7702QAxisGender);
     auto const axis_s = db.query<bool            >(DB_Irc7702QAxisSmoking);
-    if
-        (  0 == t
-        || (!axis_g && "Unisex"   != gender)
-        || (!axis_s && "Unismoke" != smoking)
-        )
+
+    if((!axis_g && "Unisex" != gender) || (!axis_s && "Unismoke" != smoking))
+        {
+        std::cout << "  skipping " << gender << ' ' << smoking << std::endl;
+        return;
+        }
+
+    if(0 == t)
         {
+        std::cout
+            << "7702 q PROBLEM: " << product_name
+            << " nonexistent table zero"
+            << ' ' << gender
+            << ' ' << smoking
+            << std::endl
+            ;
         return;
         }
 



reply via email to

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