Fix build on MSVC

This commit is contained in:
tamasmeszaros 2023-08-16 10:58:49 +02:00
parent 4589811c18
commit 9728bc4d6f
2 changed files with 4 additions and 1 deletions

View File

@ -262,6 +262,9 @@ Transform3d YStriderVBedHandler::get_physical_bed_trafo(int bed_index) const
return tr; return tr;
} }
const int GridStriderVBedHandler::ColsOutside =
static_cast<int>(std::sqrt(std::numeric_limits<int>::max()));
Vec2i GridStriderVBedHandler::raw2grid(int bed_idx) const Vec2i GridStriderVBedHandler::raw2grid(int bed_idx) const
{ {
Vec2i ret{bed_idx % ColsOutside, bed_idx / ColsOutside}; Vec2i ret{bed_idx % ColsOutside, bed_idx / ColsOutside};

View File

@ -338,7 +338,7 @@ class GridStriderVBedHandler: public VirtualBedHandler
// not representable with scaled coordinates. Combining XStrider with // not representable with scaled coordinates. Combining XStrider with
// YStrider takes care of the X and Y axis to be mapped into the physical // YStrider takes care of the X and Y axis to be mapped into the physical
// bed's coordinate region (which is representable in scaled coords) // bed's coordinate region (which is representable in scaled coords)
static const int ColsOutside = std::sqrt(std::numeric_limits<int>::max()); static const int ColsOutside;
XStriderVBedHandler m_xstrider; XStriderVBedHandler m_xstrider;
YStriderVBedHandler m_ystrider; YStriderVBedHandler m_ystrider;