[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);
- [lmi-commits] [lmi] master updated (12a9a3b -> 9b94a39), Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master 78fe48b 1/8: Assert a precondition,
Greg Chicares <=
- [lmi-commits] [lmi] master a889ef0 2/8: Assert some preconditions, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master 1e8b575 3/8: Use private interface in implementation, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master eb8cff1 5/8: Generally prefer 'int' to other integer types, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master f36110a 6/8: Record visibility in various internal data structures, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master a95ec51 4/8: Separate public and private interfaces, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master 9b94a39 8/8: Don't pass "hidden" columns into class wx_table_generator, Greg Chicares, 2018/08/06
- [lmi-commits] [lmi] master 4cf72c4 7/8: Establish a mapping from potential to actual (non-hidden) columns, Greg Chicares, 2018/08/06