Convert static data to compile time constants

This commit is contained in:
tamasmeszaros 2022-12-06 10:00:51 +01:00
parent 4a2acf9a7e
commit b1bfef44ba
2 changed files with 4 additions and 9 deletions

View File

@ -11,11 +11,6 @@
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,
size_t num_components)
{

View File

@ -60,10 +60,10 @@ public:
enum Orientation { roLandscape, roPortrait };
using TMirroring = std::array<bool, 2>;
static const TMirroring NoMirror;
static const TMirroring MirrorX;
static const TMirroring MirrorY;
static const TMirroring MirrorXY;
static const constexpr TMirroring NoMirror = {false, false};
static const constexpr TMirroring MirrorX = {true, false};
static const constexpr TMirroring MirrorY = {false, true};
static const constexpr TMirroring MirrorXY = {true, true};
struct Trafo {
bool mirror_x = false, mirror_y = false, flipXY = false;