diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-05-26 07:51:59 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-05-28 14:45:03 +0100 |
commit | 1982d50375e4f3fdf5d5ca5e497328743af4e559 (patch) | |
tree | 917c4e6e6375672366aef2d3215a49e16b025606 | |
parent | b15a8806390153748594937f321c192181f9000f (diff) |
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>
-rw-r--r-- | vdagent/image.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vdagent/image.cpp b/vdagent/image.cpp index 1b21b53..c0bcdb5 100644 --- a/vdagent/image.cpp +++ b/vdagent/image.cpp @@ -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) { |