[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a352f9e 2/9: Restore original facet get_table
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a352f9e 2/9: Restore original facet get_table() implementation |
Date: |
Wed, 15 Feb 2017 20:26:58 -0500 (EST) |
branch: master
commit a352f9e59e1eb5ccca4d5f7b070097a3d2cf3ee0
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Restore original facet get_table() implementation
Presumably this code was changed to work around the shortcomings of
ancient compilers and their standard libraries. Restored the usenet
original because it works fine with the toolchain now used for lmi.
---
facets.cpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/facets.cpp b/facets.cpp
index e388d5f..51abb63 100644
--- a/facets.cpp
+++ b/facets.cpp
@@ -76,13 +76,10 @@ namespace
private:
static std::ctype_base::mask const* get_table()
{
- static std::ctype_base::mask m_[table_size];
- std::copy(classic_table(), classic_table() + table_size, m_);
- int const space = ' ';
- m_[space] = static_cast<std::ctype_base::mask>
- (m_[space] & ~std::ctype_base::space
- );
- return m_;
+ static std::ctype_base::mask rc[table_size];
+ std::copy(classic_table(), classic_table() + table_size, rc);
+ rc[' '] &= ~std::ctype_base::space;
+ return rc;
}
};
- [lmi-commits] [lmi] master updated (0cfdd92 -> 59797a5), Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master a352f9e 2/9: Restore original facet get_table() implementation,
Greg Chicares <=
- [lmi-commits] [lmi] master da6c8c9 5/9: Do not treat tab as whitespace in UponPasteCensus(), Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master a16705a 4/9: Add a tab-is-not-ws facet, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master 9a78453 7/9: Fix defect introduced 20160517T2303: tests not updated, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master 1f9c757 8/9: Make certain unit tests more general, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master 4d92a38 6/9: Allow empty strings to be pasted into a census, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master fc4057e 3/9: Genericize, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master 59797a5 9/9: Make unit tests pastable into GUI, Greg Chicares, 2017/02/15
- [lmi-commits] [lmi] master 45a1834 1/9: Remove a dead usenet reference, Greg Chicares, 2017/02/15