lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 199bf2a 2/4: Assert that a conditional is unn


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 199bf2a 2/4: Assert that a conditional is unneeded
Date: Fri, 3 Apr 2020 16:43:55 -0400 (EDT)

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

    Assert that a conditional is unneeded
    
    Premium mode is enumerative, so it cannot be empty. Added an assertion
    to make assurance doubly sure before removing a conditional that seems
    unnecessary.
---
 pdf_command_wx.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pdf_command_wx.cpp b/pdf_command_wx.cpp
index ddda201..60d30fe 100644
--- a/pdf_command_wx.cpp
+++ b/pdf_command_wx.cpp
@@ -2239,6 +2239,8 @@ class pdf_illustration_naic : public pdf_illustration
         // Variable representing the premium payment frequency with the
         // appropriate indefinite article preceding it, e.g. "an annual"
         // or "a monthly".
+        // The if-not-empty conditional is unneeded:
+        LMI_ASSERT(!invar.InitErMode.empty());
         std::string mode0 = invar.InitErMode;
         if(!mode0.empty())
             {



reply via email to

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