lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 78fe48b 1/8: Assert a precondition


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 78fe48b 1/8: Assert a precondition
Date: Mon, 6 Aug 2018 18:36:23 -0400 (EDT)

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

    Assert a precondition
---
 wx_table_generator.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 0793757..6f7575f 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -244,14 +244,16 @@ void wx_table_generator::output_highlighted_cell
 
 /// Render a single row with the given values at the given position.
 ///
-/// The cardinality of the 'values' argument must equal the total
-/// number of columns passed to enroll_column().
+/// Asserted precondition: the cardinality of the 'values' argument
+/// equals the total number of columns passed to enroll_column(),
+/// i.e., the cardinality of all_columns().
 
 void wx_table_generator::output_row
     (int&                           pos_y
     ,std::vector<std::string> const values
     )
 {
+    LMI_ASSERT(values.size() == all_columns().size());
     int x = left_margin_;
     do_output_single_row(x, pos_y, values);
 



reply via email to

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