Convert static data to compile time constants
This commit is contained in:
parent
4a2acf9a7e
commit
b1bfef44ba
2 changed files with 4 additions and 9 deletions
src/libslic3r/SLA
|
@ -11,11 +11,6 @@
|
||||||
|
|
||||||
namespace Slic3r { namespace sla {
|
namespace Slic3r { namespace sla {
|
||||||
|
|
||||||
const RasterBase::TMirroring RasterBase::NoMirror = {false, false};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorX = {true, false};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorY = {false, true};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorXY = {true, true};
|
|
||||||
|
|
||||||
EncodedRaster PNGRasterEncoder::operator()(const void *ptr, size_t w, size_t h,
|
EncodedRaster PNGRasterEncoder::operator()(const void *ptr, size_t w, size_t h,
|
||||||
size_t num_components)
|
size_t num_components)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,10 +60,10 @@ public:
|
||||||
enum Orientation { roLandscape, roPortrait };
|
enum Orientation { roLandscape, roPortrait };
|
||||||
|
|
||||||
using TMirroring = std::array<bool, 2>;
|
using TMirroring = std::array<bool, 2>;
|
||||||
static const TMirroring NoMirror;
|
static const constexpr TMirroring NoMirror = {false, false};
|
||||||
static const TMirroring MirrorX;
|
static const constexpr TMirroring MirrorX = {true, false};
|
||||||
static const TMirroring MirrorY;
|
static const constexpr TMirroring MirrorY = {false, true};
|
||||||
static const TMirroring MirrorXY;
|
static const constexpr TMirroring MirrorXY = {true, true};
|
||||||
|
|
||||||
struct Trafo {
|
struct Trafo {
|
||||||
bool mirror_x = false, mirror_y = false, flipXY = false;
|
bool mirror_x = false, mirror_y = false, flipXY = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue