Ignore:
Timestamp:
Dec 23, 2016, 1:14:39 PM (2 years ago)
Author:
nmedfort
Message:

Reverted last change to support gcc 4.9 prior to changing UCD property table structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/PropertyObjects.cpp

    r5234 r5236  
    1717namespace UCD {
    1818
    19 using PropertyStringStream =
    20     std::basic_stringstream<char, std::char_traits<char>, PropertyStringAllocator>;
    21 
    2219std::string canonicalize_value_name(const std::string & prop_or_val) {
    2320    std::locale loc;
     
    3532    throw std::runtime_error("Property " + value_spec + " unsupported.");
    3633}
    37 const PropertyString & PropertyObject::GetPropertyValueGrepString() {
     34const std::string & PropertyObject::GetPropertyValueGrepString() {
    3835    throw std::runtime_error("Property Value Grep String unsupported.");
    3936}
     
    8077    }
    8178    return enumeration_basis_sets;
    82 };
     79}
    8380
    84 const PropertyString &EnumeratedPropertyObject::GetPropertyValueGrepString() {
    85     if (LLVM_LIKELY(property_value_grep_string.empty())) {
    86         PropertyStringStream buffer;
     81const std::string & EnumeratedPropertyObject::GetPropertyValueGrepString() {
     82    if (LLVM_LIKELY(mPropertyValueGrepString.empty())) {
     83        std::stringstream buffer;
    8784        for (unsigned i = 0; i != property_value_full_names.size(); i++) {
    8885            buffer << canonicalize_value_name(property_value_full_names[i]) + "\n";
     
    9188            buffer << canonicalize_value_name(property_value_enum_names[i]) + "\n";
    9289        }
    93         property_value_grep_string.assign(buffer.str());
     90        mPropertyValueGrepString = buffer.str();
    9491    }
    95     return property_value_grep_string;
     92    return mPropertyValueGrepString;
    9693}
    9794
     
    145142}
    146143
    147 const PropertyString & ExtensionPropertyObject::GetPropertyValueGrepString() {
     144const std::string & ExtensionPropertyObject::GetPropertyValueGrepString() {
    148145    return property_object_table[base_property]->GetPropertyValueGrepString();
    149146}
     
    172169}
    173170
    174 const PropertyString & BinaryPropertyObject::GetPropertyValueGrepString() {
    175     if (property_value_grep_string.empty()) {
    176         PropertyStringStream buffer;
     171const std::string & BinaryPropertyObject::GetPropertyValueGrepString() {
     172    if (mPropertyValueGrepString.empty()) {
     173        std::stringstream buffer;
    177174        for (const auto & prop : Binary_ns::aliases_only_map) {
    178175            buffer << std::get<0>(prop) + "\n";
    179176        }
    180         property_value_grep_string.assign(buffer.str());
     177        mPropertyValueGrepString = buffer.str();
    181178    }
    182     return property_value_grep_string;
     179    return mPropertyValueGrepString;
    183180}
    184181
Note: See TracChangeset for help on using the changeset viewer.