mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
Add static assert for bed number related values (#11035)
This commit is contained in:
@@ -197,8 +197,8 @@ private:
|
||||
int picking_id_component(int idx) const;
|
||||
|
||||
public:
|
||||
static const unsigned int PLATE_NAME_HOVER_ID = 6;
|
||||
static const unsigned int GRABBER_COUNT = 8;
|
||||
static constexpr unsigned int PLATE_NAME_HOVER_ID = 6;
|
||||
static constexpr unsigned int GRABBER_COUNT = 8;
|
||||
|
||||
static ColorRGBA SELECT_COLOR;
|
||||
static ColorRGBA UNSELECT_COLOR;
|
||||
@@ -630,7 +630,7 @@ public:
|
||||
void reset();
|
||||
};
|
||||
|
||||
static const unsigned int MAX_PLATES_COUNT = MAX_PLATE_COUNT;
|
||||
static constexpr unsigned int MAX_PLATES_COUNT = MAX_PLATE_COUNT;
|
||||
static GLTexture bed_textures[(unsigned int)btCount];
|
||||
static bool is_load_bedtype_textures;
|
||||
static bool is_load_cali_texture;
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
// EIdBase::Volume must be greater than PartPlateList::MAX_PLATES_COUNT * PartPlate::GRABBER_COUNT
|
||||
static_assert((int) SceneRaycaster::EIdBase::Volume > PartPlateList::MAX_PLATES_COUNT * PartPlate::GRABBER_COUNT, "EIdBase::Volume too small");
|
||||
|
||||
SceneRaycaster::SceneRaycaster() {
|
||||
#if ENABLE_RAYCAST_PICKING_DEBUG
|
||||
// hit point
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
enum class EIdBase
|
||||
{
|
||||
Bed = 0,
|
||||
Volume = 1000, // Must be smaller than PartPlateList::MAX_PLATES_COUNT * PartPlate::GRABBER_COUNT
|
||||
Volume = 1000, // Must be greater than PartPlateList::MAX_PLATES_COUNT * PartPlate::GRABBER_COUNT
|
||||
Gizmo = 1000000,
|
||||
FallbackGizmo = 2000000
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user