Thu, 23 Jul 2015 17:39:52 +0300
Fix min/max name clashing
sources/basics.h | file | annotate | diff | comparison | revisions | |
sources/main.cpp | file | annotate | diff | comparison | revisions |
--- a/sources/basics.h Thu Jul 23 02:35:13 2015 +0300 +++ b/sources/basics.h Thu Jul 23 17:39:52 2015 +0300 @@ -65,6 +65,9 @@ #define TEXTCOLOR_BrightCyan TEXTCOLOR_Escape "V" #define TEXTCOLOR_Reset TEXTCOLOR_Escape "-" +#undef min +#undef max + BEGIN_ZFC_NAMESPACE template<typename T>
--- a/sources/main.cpp Thu Jul 23 02:35:13 2015 +0300 +++ b/sources/main.cpp Thu Jul 23 17:39:52 2015 +0300 @@ -28,15 +28,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "main.h" - #ifndef _WIN32 # include <sys/select.h> #else # include <winsock2.h> #endif -#include <time.h> +#include "main.h" #include "network/rconsession.h" #include "huffman.h" #include "interface.h" @@ -87,7 +85,7 @@ FD_SET (0, &fdset); int fd = iface.get_session()->socket()->file_descriptor(); - highest = max (highest, fd); + highest = zfc::max (highest, fd); FD_SET (fd, &fdset); select (highest + 1, &fdset, nullptr, nullptr, &timeout);