Various clang compilation issues

This commit is contained in:
Nikita Lisitsa 2021-01-18 20:02:35 +03:00
parent e9dbc71f87
commit 07924aa0d5
5 changed files with 9 additions and 9 deletions

View file

@ -429,7 +429,7 @@ struct controller
// static constexpr std::size_t layer2 = 4;
// static constexpr std::size_t layer3 = outputs;
static constexpr std::size_t param_count = (inputs + 1) * outputs;
//static constexpr std::size_t param_count = (inputs + 1) * outputs;
static constexpr float max_output = 20.f;

View file

@ -183,15 +183,15 @@ struct physics_2d_app
(void)task;
// task();
// loop.dispatch_at(std::chrono::system_clock::now() + std::chrono::seconds{1}, [this]{
// loop.dispatch_at(async::executor::clock::now() + std::chrono::seconds{1}, [this]{
// physics.add_object(ball_group, ball_shape, material, {simulation_box.corner(0.5f, 0.9f), 0.f}, {});
// });
loop.dispatch_at(std::chrono::system_clock::now() + std::chrono::seconds{1}, [this]{
loop.dispatch_at(async::executor::clock::now() + std::chrono::seconds{1}, [this]{
physics.explode(simulation_box.corner(0.5f, -0.2f), 1000.f, 100.f);
});
// loop.dispatch_at(std::chrono::system_clock::now() + std::chrono::seconds{5}, [this]{
// loop.dispatch_at(async::executor::clock::now() + std::chrono::seconds{5}, [this]{
// stop();
// });
}

View file

@ -80,7 +80,7 @@ namespace psemek::geom
{
static_assert(sizeof...(Ts) == N);
T w[N] = {ts...};
T w[N] = {static_cast<T>(ts)...};
point_type res;
for (std::size_t i = 0; i < N; ++i)
res[i] = lerp(axes[i], w[i]);

View file

@ -6,6 +6,7 @@
#include <iomanip>
#include <sstream>
#include <vector>
namespace psemek::gfx
{

View file

@ -9,10 +9,9 @@ namespace psemek::util
: std::istream
{
memory_istream(std::string_view data)
: b_(data)
{
rdbuf(&b_);
}
: std::istream(&b_)
, b_(data)
{}
private:
struct buf