From fdc979e48b67369204a23230f4b0881c7e3a460c Mon Sep 17 00:00:00 2001 From: Jorge Rodriguez Date: Wed, 30 Jul 2014 17:30:25 -0700 Subject: [PATCH] Some minor ports for Linux. No idea how it worked at all in Windows with STB_RESIZE_IMPLEMENTATION instead of STB_RESAMPLE_IMPLEMENTATION. --- tests/resample_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/resample_test.cpp b/tests/resample_test.cpp index 55a3b2d..71332fb 100644 --- a/tests/resample_test.cpp +++ b/tests/resample_test.cpp @@ -2,6 +2,9 @@ #define STBR_ASSERT(x) \ if (!(x)) \ __debugbreak(); +#else +#include +#define STBR_ASSERT(x) assert(x) #endif #define STB_RESAMPLE_IMPLEMENTATION @@ -28,7 +31,7 @@ int main(int argc, char** argv) int n; int out_w, out_h, out_stride; -#if 1 +#if 0 test_suite(); return 0; #endif @@ -210,7 +213,7 @@ void test_float(const char* file, float width_percent, float height_percent, stb free(output_data); } -void test_channels(char* file, float width_percent, float height_percent, int channels) +void test_channels(const char* file, float width_percent, float height_percent, int channels) { int w, h, n; unsigned char* input_data = stbi_load(file, &w, &h, &n, 0);