[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9df07e2 2/2: Correct table defects more aggre
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9df07e2 2/2: Correct table defects more aggressively |
Date: |
Fri, 16 Dec 2016 14:33:33 +0000 (UTC) |
branch: master
commit 9df07e287475722966cde5f8beb327d27217e969
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Correct table defects more aggressively
---
rate_table.cpp | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/rate_table.cpp b/rate_table.cpp
index 251a190..a8a71e5 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -1859,23 +1859,11 @@ void table_impl::validate()
uint16_t putative_num_decimals = *num_decimals_;
uint16_t required_num_decimals = deduce_number_of_decimals(values_);
- if(required_num_decimals < putative_num_decimals)
- {
- warning()
- << "Table #" << *number_
- << " specifies " << putative_num_decimals
- << " decimals, but " << required_num_decimals
- << " would suffice."
- << LMI_FLUSH
- ;
- }
- // Later, change '<' to '!=' to trim trailing zeros too (and expunge
- // the warning above); but for now, adjust only for lost precision.
// This condition is true only if the table is defective,
// which should occur rarely enough that the cost of
// recalculating the hash value both here and below
// doesn't matter.
- if(putative_num_decimals < required_num_decimals)
+ if(putative_num_decimals != required_num_decimals)
{
warning()
<< "Table #" << *number_