diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-01-15 11:34:50 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-01-15 11:34:50 +0300 |
commit | 59911e7c35c61725834dc30c46bf964eb4774fbc (patch) | |
tree | 2d960d68c757debb2a0cfcd9ddc10fdad100ceb8 /src/libslic3r/Fill/FillPlanePath.cpp | |
parent | 21d01291fb4c3a79be537e694ce02ca2c537263d (diff) |
Slight improvement in Hilbert infill by using constexpr
Diffstat (limited to 'src/libslic3r/Fill/FillPlanePath.cpp')
-rw-r--r-- | src/libslic3r/Fill/FillPlanePath.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libslic3r/Fill/FillPlanePath.cpp b/src/libslic3r/Fill/FillPlanePath.cpp index a7a33b13d..7beaf2f08 100644 --- a/src/libslic3r/Fill/FillPlanePath.cpp +++ b/src/libslic3r/Fill/FillPlanePath.cpp @@ -101,9 +101,9 @@ Pointfs FillArchimedeanChords::_generate(coord_t min_x, coord_t min_y, coord_t m // static inline Point hilbert_n_to_xy(const size_t n) { - static const int next_state[16] = { 4,0,0,12, 0,4,4,8, 12,8,8,4, 8,12,12,0 }; - static const int digit_to_x[16] = { 0,1,1,0, 0,0,1,1, 1,0,0,1, 1,1,0,0 }; - static const int digit_to_y[16] = { 0,0,1,1, 0,1,1,0, 1,1,0,0, 1,0,0,1 }; + static constexpr const int next_state[16] { 4,0,0,12, 0,4,4,8, 12,8,8,4, 8,12,12,0 }; + static constexpr const int digit_to_x[16] { 0,1,1,0, 0,0,1,1, 1,0,0,1, 1,1,0,0 }; + static constexpr const int digit_to_y[16] { 0,0,1,1, 0,1,1,0, 1,1,0,0, 1,0,0,1 }; // Number of 2 bit digits. size_t ndigits = 0; |