Skip to content

Commit 4052eee

Browse files
committed
Fix clang warnings.
1 parent 794d9bf commit 4052eee

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sweep.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ int offsetCompare(const void *o1, const void *o2) {
4949
}
5050

5151
// workarounds for the fact that a float can't be passed as a non-type template parameter
52-
struct OutsideShortFFFF { static const unsigned short value = 0xFFFF; };
53-
struct OutsideFloatMax { static const float value = FLT_MAX; };
52+
struct OutsideShortFFFF { static const unsigned short value; };
53+
const unsigned short OutsideShortFFFF::value = 0xFFFF;
54+
struct OutsideFloatMax { static const float value; };
55+
const float OutsideFloatMax::value = FLT_MAX;
5456

5557
template <typename T, typename Outside> class Matrix {
5658
private:
@@ -85,7 +87,7 @@ template <typename T, typename Outside> class Matrix {
8587
int getHeight() const {
8688
return content->height;
8789
}
88-
float setScale(float scale) {
90+
void setScale(float scale) {
8991
content->scale = scale;
9092
}
9193
float getScale() const {
@@ -397,8 +399,8 @@ int main(int argc, char **argv) {
397399
"Left half of cross section goes inside, right half outside.\n"
398400
"Output is scaled according to resolution of cross-section image.\n"
399401
"--flip-x: Mirror output in x direction.\n\n"
400-
"Version 1.2\n"
401-
"Copyright (c) 2013-2015 Christian Walther <cwalther%cgmx.ch>\n"
402+
"Version 1.3\n"
403+
"Copyright (c) 2013-2020 Christian Walther <cwalther%cgmx.ch>\n"
402404
"https://github.com/cwalther/cookie-cutter-sweeper\n", argv[0], '@');
403405
return 2;
404406
}
@@ -453,7 +455,7 @@ int main(int argc, char **argv) {
453455
// for all four cells surrounding the edge, in right-hand-rule order with respect to (dx, dy, dz), i.e. all four vertices of the face
454456
for (int j = 0; j < 4; j++) {
455457
int k = (j ^ (j >> 1));
456-
k = ((k << 1+i) | (k << 4+i));
458+
k = ((k << (1+i)) | (k << (4+i)));
457459
int ex = ((k >> 3) & 1);
458460
int ey = ((k >> 4) & 1);
459461
int ez = ((k >> 5) & 1);

0 commit comments

Comments
 (0)