Ignore:
Timestamp:
Jul 2, 2015, 4:51:32 PM (4 years ago)
Author:
nmedfort
Message:

Fix for SCX and updated property objects.

File:
1 edited

Legend:

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

    r4627 r4631  
    88#include "PropertyObjects.h"
    99#include <sstream>
     10#include <algorithm>
    1011
    1112namespace UCD {
     
    3435}
    3536
    36 UnicodeSet EnumeratedPropertyObject::GetCodepointSet(const std::string & value_spec) {
     37const UnicodeSet & EnumeratedPropertyObject::GetCodepointSet(const std::string & value_spec) {
    3738    int property_enum_val = GetPropertyValueEnumCode(value_spec);
    3839    if (property_enum_val == -1) {
     
    4243}
    4344
    44 UnicodeSet EnumeratedPropertyObject::GetCodepointSet(const int property_enum_val) const {
     45const UnicodeSet & EnumeratedPropertyObject::GetCodepointSet(const int property_enum_val) const {
    4546    assert (property_enum_val >= 0);
    46     return property_value_sets[property_enum_val];
     47    return *(property_value_sets[property_enum_val]);
    4748}
    4849
     
    5051    // The canonical full names are not stored in the precomputed alias map,
    5152    // to save space in the executable.   Add them if the property is used.
    52     if (!aliases_initialized) {
     53    if (uninitialized) {
    5354        for (unsigned i = 0; i != property_value_full_names.size(); i++) {
    5455            property_value_aliases.insert({canonicalize_value_name(property_value_full_names[i]), i});
     
    5758            property_value_aliases.insert({canonicalize_value_name(property_value_enum_names[i]), i});
    5859        }
    59         aliases_initialized = true;
     60        uninitialized = false;
    6061    }
    6162    const auto valit = property_value_aliases.find(value_spec);
Note: See TracChangeset for help on using the changeset viewer.