#pragma once #include #include namespace hex::plugin::visualizers { template std::vector patternToArray(pl::ptrn::Pattern *pattern){ const auto bytes = pattern->getBytes(); std::vector result; result.resize(bytes.size() / sizeof(T)); for (size_t i = 0; i < result.size(); i++) std::memcpy(&result[i], &bytes[i * sizeof(T)], sizeof(T)); return result; } }