diff --git a/plugins/builtin/include/content/helpers/pattern_drawer.hpp b/plugins/builtin/include/content/helpers/pattern_drawer.hpp index 6272bf089..a3ae5a1a5 100644 --- a/plugins/builtin/include/content/helpers/pattern_drawer.hpp +++ b/plugins/builtin/include/content/helpers/pattern_drawer.hpp @@ -10,6 +10,8 @@ namespace hex { public: PatternDrawer() = default; + void draw(pl::ptrn::Pattern& pattern); + void visit(pl::ptrn::PatternArrayDynamic& pattern) override; void visit(pl::ptrn::PatternArrayStatic& pattern) override; void visit(pl::ptrn::PatternBitfieldField& pattern) override; @@ -29,8 +31,6 @@ namespace hex { void visit(pl::ptrn::PatternWideString& pattern) override; private: - void draw(pl::ptrn::Pattern& pattern); - constexpr static auto ChunkSize = 512; constexpr static auto DisplayEndStep = 64; diff --git a/plugins/builtin/source/content/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp index b89580d30..9b041a77e 100644 --- a/plugins/builtin/source/content/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -124,8 +124,9 @@ namespace hex::plugin::builtin { ImGui::TableHeadersRow(); if (!sortedPatterns.empty()) { - for (auto &pattern : sortedPatterns) - pattern->accept(this->m_patternDrawer); + for (auto &pattern : sortedPatterns) { + this->m_patternDrawer.draw(*pattern); + } } ImGui::EndTable();