Commit 0bed63c8 authored by captainwong's avatar captainwong

NOMINMAX

parent d1b29132
......@@ -4,6 +4,10 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>
......
......@@ -11,6 +11,9 @@
# ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
# define _WINSOCK_DEPRECATED_NO_WARNINGS
# endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib")
#endif
......
......@@ -4,6 +4,9 @@
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>
......
#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib")
#define ioctl ioctlsocket
......
......@@ -6,6 +6,9 @@
# ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
# endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib")
#endif
......
......@@ -46,14 +46,6 @@ static inline int localtime_r(time_t* t, struct tm* tm_time) {
return localtime_s(tm_time, t);
}
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#endif // __GNUG__
......
......@@ -4,6 +4,10 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <stdint.h>
#ifdef ENABLE_ADEMCO_EVENT_TO_STRING
......
......@@ -6,6 +6,7 @@
#include <string>
#include <memory>
#include <iterator>
#include <algorithm>
namespace ademco
{
......@@ -1234,8 +1235,8 @@ struct AdemcoPacket
}
// dump data
JLOG_HEX(pack, pack_len);
JLOG_ASC(pack, pack_len);
JLOG_HEX(pack, std::min(pack_len, 4096u));
JLOG_ASC(pack, std::min(pack_len, 4096u));
assert(0);
return ParseResult::RESULT_DATA_ERROR;
......
#pragma once
#include "ademco_packet.h"
#include <assert.h>
#include <stdint.h>
#include <string.h>
......@@ -7,7 +8,6 @@
#include <string>
#include <type_traits>
#include <iterator>
#include "ademco_packet.h"
namespace hb
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment