Ignore:
Timestamp:
Sep 28, 2015, 2:39:59 PM (4 years ago)
Author:
nmedfort
Message:

Bug fixes

File:
1 edited

Legend:

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

    r4797 r4804  
    99
    1010namespace UCD {
     11
     12/** ------------------------------------------------------------------------------------------------------------- *
     13 * @brief addTarget
     14 ** ------------------------------------------------------------------------------------------------------------- */
     15inline void UCDCompiler::addTarget(const UnicodeSet & set) {
     16    mTargetMap.emplace(&set, PabloBlock::createZeroes());
     17}
    1118
    1219/** ------------------------------------------------------------------------------------------------------------- *
     
    8996            }
    9097        }
    91         for (Target t : nonIntersectingTargets) {
    92             mTargetMap.insert(t);
     98        for (const Target t : nonIntersectingTargets) {
     99            mTargetMap.emplace(t.first, t.second);
    93100        }
    94101    }
     
    99106 ** ------------------------------------------------------------------------------------------------------------- */
    100107void UCDCompiler::generateSubRanges(const codepoint_t lo, const codepoint_t hi, PabloBuilder & builder) {
    101     for (Target & t : mTargetMap) {
     108    for (auto & t : mTargetMap) {
    102109        const auto range = rangeIntersect(*t.first, lo, hi);
    103110        PabloAST * target = t.second;
     
    354361    }
    355362    return ranges;
    356 }
    357 
    358 /** ------------------------------------------------------------------------------------------------------------- *
    359  * @brief addTarget
    360  ** ------------------------------------------------------------------------------------------------------------- */
    361 inline void UCDCompiler::addTarget(const UnicodeSet & set) {
    362 #ifdef USE_BOOST
    363     mTargetMap.emplace(&set, PabloBlock::createZeroes());
    364 #else
    365     mTargetMap.insert(std::make_pair(&set, PabloBlock::createZeroes()));
    366 #endif
    367363}
    368364
Note: See TracChangeset for help on using the changeset viewer.