Skip to content

Make the new distributions in the spray engine use KisRandomSource

This MR exposes the taus88 generator in KisRandomSource through a boost::taus88& uniformSource() const; member function, so that KisRandomSource can be used as a generator in other distributions.

Another way would be to add multiple methods to KisRandomSourceso that it conforms to the interface required by the generator concept. But since in boost the signature of functions like min and max in the engines changed to constexpr, I think in version 1.75, and the freebsd job in the pipeline uses version 1.72, this means that at least those functions should use some macros to detect the version and put the constexpr conditionally.

Also, for the same reason stated in the previous paragraph this change requires that the new distributions use boost::random instead std::random because the latter requires the min and max functions to be constexpr at least in the freebsd job.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports