Ignore:
Timestamp:
Aug 28, 2017, 4:00:17 PM (20 months ago)
Author:
nmedfort
Message:

Bug fixes for multigrep mode. Optional PabloKernel? branch hit counter added. Minor optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/alphabet.cpp

    r5279 r5620  
    1212// of the nth character is just the given value n, if it is in range.
    1313
    14 UCD::codepoint_t Alphabet::toUnicode(unsigned n) {
     14UCD::codepoint_t Alphabet::toUnicode(const unsigned n) const {
    1515    UCD::codepoint_t cp = n;
    1616    if (mCharSet.contains(cp)) return cp;
     
    2121// of a Unicode codepoint is just the given codepoint, if it is in range.
    2222
    23 unsigned Alphabet::fromUnicode(UCD::codepoint_t codepoint) {
     23unsigned Alphabet::fromUnicode(const UCD::codepoint_t codepoint) const {
    2424    if (mCharSet.contains(codepoint)) return codepoint;
    2525    throw std::runtime_error("fromUnicode: codepoint not found in alphabet.");
     
    3636}   
    3737
    38 template <class uint_t> UCD::codepoint_t ExtendedASCII<uint_t>::toUnicode(unsigned n) {
     38template <class uint_t> UCD::codepoint_t ExtendedASCII<uint_t>::toUnicode(const unsigned n) const {
    3939    //  The first 128 characters are just ASCII.
    4040    if (n < 128) return n;
     
    4343}   
    4444
    45 template <class uint_t> unsigned ExtendedASCII<uint_t>::fromUnicode(UCD::codepoint_t codepoint) {
     45template <class uint_t> unsigned ExtendedASCII<uint_t>::fromUnicode(const UCD::codepoint_t codepoint) const {
    4646    if (codepoint < 128) return codepoint;
    4747    for (unsigned i = 0; i < 128; i++) {
Note: See TracChangeset for help on using the changeset viewer.