1
0
mirror of synced 2024-09-25 03:58:27 +02:00

sys: Fix compile on Unix

This commit is contained in:
WerWolv 2021-03-02 14:22:47 +01:00
parent 3a7a3a6e9c
commit c84ac0bc10

View File

@ -190,13 +190,13 @@ namespace hex {
ImGui::TextUnformatted("hex.view.information.distribution"_lang);
ImPlot::SetNextPlotLimits(0, 256, 0, float(*std::max_element(this->m_valueCounts.begin(), this->m_valueCounts.end())) * 1.1F, ImGuiCond_Always);
if (ImPlot::BeginPlot("##distribution", "Address", "Count", ImVec2(-1,0), ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect, ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock)) {
constexpr static auto x = []{
static auto x = []{
std::array<u64, 256> result{ 0 };
std::iota(result.begin(), result.end(), 0);
return result;
}();
ImPlot::PlotBars("##bytes", x.data(), this->m_valueCounts.data(), x.size(), 0.67);
ImPlot::PlotBars<ImU64>("##bytes", x.data(), this->m_valueCounts.data(), x.size(), 0.67);
ImPlot::EndPlot();
}