Add podman release build tooling + misc build fixes (#1455)

This commit is contained in:
trapexit 2025-05-08 00:00:53 -05:00 • committed by GitHub
parent 344014aa81
commit fa3266ca7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
90 changed files with 1207 additions and 3657 deletions

View file

@ -19,7 +19,7 @@
#pragma once
#include <cstdint>
#include <random>
class RND
{
@ -31,4 +31,21 @@ public:
static uint64_t rand64(const uint64_t max_);
static uint64_t rand64(const uint64_t min_,
const uint64_t max_);
template<typename T>
static
void
shrink_to_rand_elem(std::vector<T> &v_)
{
static std::mt19937 gen(std::random_device{}());
if(v_.size() <= 1)
return;
std::uniform_int_distribution<> dist(0,(v_.size() - 1));
std::swap(v_[0],v_[dist(gen)]);
v_.resize(1);
}
};