Ignore:
Timestamp:
May 10, 2016, 12:12:41 AM (3 years ago)
Author:
nmedfort
Message:

UnicodeSet? bug fix and compile warning clean-up.

Location:
icGREP/icgrep-devel/icgrep/re
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/printer_re.cpp

    r4841 r5037  
    148148        retVal = "???";
    149149    }
    150     return std::move(retVal);
     150    return retVal;
    151151}
  • icGREP/icgrep-devel/icgrep/re/re_cc.h

    r4983 r5037  
    159159
    160160inline CC * subtractCC(const CC * a, const CC * b) {
    161     return new CC(std::move(*a - *b));
     161    return new CC(*a - *b);
    162162}
    163163
    164164inline CC * intersectCC(const CC * a, const CC * b) {
    165     return new CC(std::move(*a & *b));
     165    return new CC(*a & *b);
    166166}
    167167
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5030 r5037  
    160160                        } else {
    161161                        #endif
    162                             name->setDefinition(makeCC(std::move(UCD::resolveUnicodeSet(name))));
     162                            name->setDefinition(makeCC(UCD::resolveUnicodeSet(name)));
    163163                        #ifndef DISABLE_PREGENERATED_UCD_FUNCTIONS
    164164                        }
  • icGREP/icgrep-devel/icgrep/re/re_memoizer.hpp

    r4823 r5037  
    66
    77namespace re {
    8 
    9 namespace {
    108
    119struct MemoizerComparator {
     
    1917    }
    2018};
    21 
    22 }
    2319
    2420struct Memoizer : public std::set<RE *, MemoizerComparator> {
  • icGREP/icgrep-devel/icgrep/re/re_parser.cpp

    r4947 r5037  
    502502        }
    503503        // We have a property-name = value expression
    504         return createName(std::move(canonicalize(start, prop_end)), std::move(canonicalize(val_start, mCursor.pos())));
    505     }
    506     return createName(std::move(canonicalize(start, mCursor.pos())));
     504        return createName(canonicalize(start, prop_end), canonicalize(val_start, mCursor.pos()));
     505    }
     506    return createName(canonicalize(start, mCursor.pos()));
    507507}
    508508
     
    589589    // a following hyphen can indicate set subtraction.
    590590    enum {NoItem, CodepointItem, RangeItem, SetItem, BrackettedSetItem} lastItemKind = NoItem;
    591     codepoint_t lastCodepointItem;
    592 
     591
     592    codepoint_t lastCodepointItem = 0;
    593593    bool havePendingOperation = false;
    594     CharsetOperatorKind pendingOperationKind;
    595     RE * pendingOperand;
     594    CharsetOperatorKind pendingOperationKind = intersectOp;
     595    RE * pendingOperand = nullptr;
    596596
    597597    // If the first character after the [ is a ^ (caret) then the matching character class is complemented.
     
    865865        }
    866866        else {
    867             value = (value * 16) | ((t | 32) - 'a') + 10;
     867            value = ((value * 16) | ((t | 32) - 'a')) + 10;
    868868        }
    869869        ++mCursor;
  • icGREP/icgrep-devel/icgrep/re/re_re.cpp

    r4860 r5037  
    33namespace re {
    44RE::Allocator RE::mAllocator;
     5RE::VectorAllocator RE::mVectorAllocator;
    56}
  • icGREP/icgrep-devel/icgrep/re/re_re.h

    r4983 r5037  
    3939public:
    4040    using Allocator = SlabAllocator<u_int8_t>;
    41     using VectorAllocator = Allocator::rebind<RE *>::other;
     41    using VectorAllocator = SlabAllocator<RE *>;
    4242    enum class ClassTypeId : unsigned {
    4343        Alt
     
    7272
    7373    static Allocator mAllocator;
     74    static VectorAllocator mVectorAllocator;
    7475};
    7576
     
    8283    inline Vector(const ClassTypeId id)
    8384    : RE(id)
    84     , std::vector<RE*, RE::VectorAllocator>(reinterpret_cast<VectorAllocator &>(mAllocator))
     85    , std::vector<RE*, RE::VectorAllocator>(mVectorAllocator)
    8586    {
    8687
     
    8889    inline Vector(const ClassTypeId id, const iterator begin, const iterator end)
    8990    : RE(id)
    90     , std::vector<RE*, RE::VectorAllocator>(begin, end, reinterpret_cast<VectorAllocator &>(mAllocator)) {
     91    , std::vector<RE*, RE::VectorAllocator>(begin, end, mVectorAllocator) {
    9192
    9293    }
Note: See TracChangeset for help on using the changeset viewer.