Fixed a compilation problem on OSX.

Fixed an inverted assert condition.
This commit is contained in:
bubnikv 2016-10-20 18:34:33 +02:00
parent 9e4edcd8ec
commit 978fca6f7c
2 changed files with 4 additions and 3 deletions

View File

@ -1043,7 +1043,7 @@ bool FillRectilinear2::fill_surface_by_lines(const Surface *surface, const FillP
}
// Verify the segments. If something is wrong, give up.
#define ASSERT_OR_RETURN(CONDITION) do { assert(CONDITION); if (CONDITION) return false; } while (0)
#define ASSERT_OR_RETURN(CONDITION) do { assert(CONDITION); if (! (CONDITION)) return false; } while (0)
for (size_t i_seg = 0; i_seg < segs.size(); ++ i_seg) {
SegmentedIntersectionLine &sil = segs[i_seg];
// The intersection points have to be even.

View File

@ -5,7 +5,8 @@
#include <ostream>
#include <iostream>
#include <sstream>
#include <stdint.h>
#include <cstdio>
#include <cstdint>
#include <stdarg.h>
#define SLIC3R_VERSION "1.3.0-dev"
@ -71,7 +72,7 @@ inline std::string debug_out_path(const char *name, ...)
char buffer[2048];
va_list args;
va_start(args, name);
vsprintf(buffer, name, args);
std::vsprintf(buffer, name, args);
va_end(args);
return std::string(DEBUG_FILE_PREFIX) + std::string(buffer);
}