Ignore:
Timestamp:
Dec 23, 2016, 1:14:39 PM (3 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/grep_engine.cpp

    r5234 r5236  
    3636#include <IDISA/CudaDriver.h>
    3737#endif
     38#include <util/aligned_allocator.h>
    3839
    3940static cl::OptionCategory bGrepOutputOptions("Output Options",
     
    434435
    435436const std::vector<std::string> & GrepEngine::grepPropertyValues(const std::string& propertyName) {
     437    AlignedAllocator<char, 32> alloc;
    436438    setParsedPropertyValues();
    437     const auto & str = UCD::getPropertyValueGrepString(propertyName);
    438     mGrepFunction(const_cast<char *>(str.data()), str.size(), 0);
     439    const std::string & str = UCD::getPropertyValueGrepString(propertyName);
     440    char * aligned = alloc.allocate(str.length() + 1, 0);
     441    std::memcpy(aligned, str.data(), str.length());
     442    aligned[str.length()] = '\0';
     443    mGrepFunction(aligned, str.length(), 0);
     444    alloc.deallocate(aligned, 0);
    439445    return getParsedPropertyValues();
    440446}
Note: See TracChangeset for help on using the changeset viewer.