forked from Mirrors/openclonk
Remove a49cc8f3de41 and add more solid fix
parent
eec47cc89a
commit
b1f0c3e1c6
|
@ -63,6 +63,11 @@ foreach(FLAG ${OC_CXX_FLAGS})
|
|||
endforeach()
|
||||
set(CMAKE_REQUIRED_FLAGS ${OC_REQUIRED_FLAGS})
|
||||
CHECK_CXX_SOURCE_COMPILES("void f(struct D&&); int main() { return 0; }" HAVE_RVALUE_REF)
|
||||
CHECK_CXX_SOURCE_COMPILES("int main() { void *d = nullptr; }" HAVE_NULLPTR)
|
||||
if(HAVE_NULLPTR)
|
||||
CHECK_CXX_SOURCE_COMPILES("#include <cstddef>
|
||||
template<class T> void f(T &&); template<> void f(std::nullptr_t &&) {} int main() { f(NULL); }" NULL_IS_NULLPTR_T)
|
||||
endif()
|
||||
|
||||
if(MSVC_VERSION GREATER 1499)
|
||||
# Activate minimal rebuild
|
||||
|
|
|
@ -185,3 +185,9 @@
|
|||
/* Define to 1 if you have support for precompiled headers */
|
||||
#cmakedefine HAVE_PRECOMPILED_HEADERS 1
|
||||
|
||||
/* Define to 1 if you have support for nullptr. */
|
||||
#cmakedefine HAVE_NULLPTR 1
|
||||
|
||||
/* Define to 1 if your NULL is an instance of std::nullptr_t. */
|
||||
#cmakedefine NULL_IS_NULLPTR_T 1
|
||||
|
||||
|
|
|
@ -55,11 +55,17 @@ inline void operator delete(void *p, const char *, long)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// C++0x nullptr
|
||||
#if defined(HAVE_NULLPTR) && !defined(NULL_IS_NULLPTR_T)
|
||||
#undef NULL
|
||||
#define NULL nullptr
|
||||
#endif
|
||||
|
||||
// Integer dataypes
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined(_MSC_VER)
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
|
|
|
@ -1636,14 +1636,14 @@ StdMeshInstance::AnimationNodeList::iterator StdMeshInstance::GetStackIterForSlo
|
|||
if(!create)
|
||||
return AnimationStack.end();
|
||||
else
|
||||
return AnimationStack.insert(iter, static_cast<AnimationNode*>(NULL));
|
||||
return AnimationStack.insert(iter, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if(!create)
|
||||
return AnimationStack.end();
|
||||
else
|
||||
return AnimationStack.insert(AnimationStack.end(), static_cast<AnimationNode*>(NULL));
|
||||
return AnimationStack.insert(AnimationStack.end(), NULL);
|
||||
}
|
||||
|
||||
bool StdMeshInstance::ExecuteAnimationNode(AnimationNode* node)
|
||||
|
|
|
@ -236,7 +236,7 @@ bool CStdAVIFile::OpenFile(const char *szFilename, HWND hWnd, int32_t iOutBitDep
|
|||
if (!hDC) return false;
|
||||
hDD = DrawDibOpen();
|
||||
if (!hDD) return false;
|
||||
hBitmap = CreateDIBSection(hDC, pbmi, DIB_RGB_COLORS, (void**)(&pFrameData), NULL, NULL);
|
||||
hBitmap = CreateDIBSection(hDC, pbmi, DIB_RGB_COLORS, (void**)(&pFrameData), NULL, 0);
|
||||
if (!hBitmap) return false;
|
||||
SelectObject(hDC, hBitmap);
|
||||
// create a GetFrame-object
|
||||
|
|
Loading…
Reference in New Issue