Made to compile by MSVC 2015/2017 32 bit compilers

This commit is contained in:
Anatoly Shirokov 2018-02-13 00:25:55 +03:00
parent 2a2d4a260e
commit 6ddd55a28a
3 changed files with 9 additions and 4 deletions

View File

@ -581,9 +581,9 @@ endif()
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_USING_V110_SDK71_
-DWIN32 -D_WINDOWS -D_UNICODE -DUNICODE -DWIN64
-DWIN32 -D_WINDOWS -D_UNICODE -DUNICODE
-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
-DHAVE_STDINT_H -DZLIB_WINAPI)
-DHAVE_STDINT_H)
endif()
add_definitions(-DAL_LIBTYPE_STATIC)

View File

@ -43,10 +43,15 @@ inline constexpr void noop() {
std::abort();
}
inline constexpr void validate(bool condition, const char *message, const char *file, int line) {
inline
#if !defined(_MSC_VER) || (_MSC_VER > 1900)
constexpr
#endif
void validate(bool condition, const char *message, const char *file, int line) {
(GSL_UNLIKELY(!(condition))) ? fail(message, file, line) : noop();
}
} // namespace assertion
} // namespace base

View File

@ -54,4 +54,4 @@ void as_const(const T&&) = delete;
#include <cstdint>
#define qsl(s) QStringLiteral(s)
#define qstr(s) QLatin1String(s, sizeof(s) - 1)
#define qstr(s) QLatin1String(s, s + sizeof(s))