lmi-commits
[Top][All Lists]
Advanced

[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;
             }
     };
 



reply via email to

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