Browse Source

Compiler warning fixes

Chlumsky 4 years ago
parent
commit
82364f92ec
3 changed files with 2 additions and 3 deletions
  1. 1 0
      core/msdf-edge-artifact-patcher.cpp
  2. 0 1
      core/shape-description.cpp
  3. 1 2
      main.cpp

+ 1 - 0
core/msdf-edge-artifact-patcher.cpp

@@ -1,6 +1,7 @@
 
 
 #include "msdf-edge-artifact-patcher.h"
 #include "msdf-edge-artifact-patcher.h"
 
 
+#include <cstring>
 #include <vector>
 #include <vector>
 #include <utility>
 #include <utility>
 #include "arithmetics.hpp"
 #include "arithmetics.hpp"

+ 0 - 1
core/shape-description.cpp

@@ -75,7 +75,6 @@ static bool readContour(T *input, Contour &output, const Point2 *first, int term
     while ((c = readChar(input)) != terminator) {
     while ((c = readChar(input)) != terminator) {
         if (c != ';')
         if (c != ';')
             return false;
             return false;
-        bool parenthesis = false;
         EdgeColor color = WHITE;
         EdgeColor color = WHITE;
         int result = readCoord(input, p[1]);
         int result = readCoord(input, p[1]);
         if (result == 2) {
         if (result == 2) {

+ 1 - 2
main.cpp

@@ -389,7 +389,6 @@ int main(int argc, const char * const *argv) {
     bool scaleSpecified = false;
     bool scaleSpecified = false;
     double angleThreshold = DEFAULT_ANGLE_THRESHOLD;
     double angleThreshold = DEFAULT_ANGLE_THRESHOLD;
     double errorCorrectionThreshold = MSDFGEN_DEFAULT_ERROR_CORRECTION_THRESHOLD;
     double errorCorrectionThreshold = MSDFGEN_DEFAULT_ERROR_CORRECTION_THRESHOLD;
-    bool defEdgeAssignment = true;
     const char *edgeAssignment = NULL;
     const char *edgeAssignment = NULL;
     bool yFlip = false;
     bool yFlip = false;
     bool printMetrics = false;
     bool printMetrics = false;
@@ -673,7 +672,7 @@ int main(int argc, const char * const *argv) {
     double glyphAdvance = 0;
     double glyphAdvance = 0;
     if (!inputType || !input)
     if (!inputType || !input)
         ABORT("No input specified! Use either -svg <file.svg> or -font <file.ttf/otf> <character code>, or see -help.");
         ABORT("No input specified! Use either -svg <file.svg> or -font <file.ttf/otf> <character code>, or see -help.");
-    if (mode == MULTI_AND_TRUE && (format == BMP || format == AUTO && output && cmpExtension(output, ".bmp")))
+    if (mode == MULTI_AND_TRUE && (format == BMP || (format == AUTO && output && cmpExtension(output, ".bmp"))))
         ABORT("Incompatible image format. A BMP file cannot contain alpha channel, which is required in mtsdf mode.");
         ABORT("Incompatible image format. A BMP file cannot contain alpha channel, which is required in mtsdf mode.");
     Shape shape;
     Shape shape;
     switch (inputType) {
     switch (inputType) {