Skip to content

Commit

Permalink
Merge pull request #46 from Squareys/iterator-dbg-level
Browse files Browse the repository at this point in the history
Avoid iterator debug level mismatches for linking as library
  • Loading branch information
richgel999 authored Aug 22, 2019
2 parents 8b6cfe1 + 2df7937 commit 6002320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for

#ifdef _MSC_VER
#pragma warning (disable : 4201)

#ifndef BASISU_NO_ITERATOR_DEBUG_LEVEL
#if defined(_DEBUG) || defined(DEBUG)
#define _ITERATOR_DEBUG_LEVEL 1
#define _SECURE_SCL 1
Expand All @@ -38,6 +40,7 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for
#define _ITERATOR_DEBUG_LEVEL 0
#endif
#endif
#endif

#include "lodepng.h"

Expand Down
2 changes: 2 additions & 0 deletions transcoder/basisu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#pragma warning (disable : 4201)
#pragma warning (disable : 4127) // warning C4127: conditional expression is constant
#pragma warning (disable : 4530) // C++ exception handler used, but unwind semantics are not enabled.
#ifndef BASISU_NO_ITERATOR_DEBUG_LEVEL
//#define _HAS_ITERATOR_DEBUGGING 0
#if defined(_DEBUG) || defined(DEBUG)
#define _ITERATOR_DEBUG_LEVEL 1
Expand All @@ -27,6 +28,7 @@
#define _SECURE_SCL 0
#define _ITERATOR_DEBUG_LEVEL 0
#endif
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
Expand Down

0 comments on commit 6002320

Please sign in to comment.