Fix minor compiler compatibility

Ensure std::min is declared including directly algorithm header.
Undefine possible min and max macros, some Windows headers define them.
Currently happens using Visual Studio 2015.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2018-05-26 07:51:59 +01:00
parent b15a880639
commit 1982d50375

View File

@ -18,11 +18,15 @@
#include <spice/macros.h>
#include <memory>
#include <vector>
#include <algorithm>
#include "vdcommon.h"
#include "image.h"
#include "imagepng.h"
#undef max
#undef min
static ImageCoder *get_coder(uint32_t vdagent_type)
{
switch (vdagent_type) {