From d7602d5a7daea3d646b7f68da441078e6ae904f0 Mon Sep 17 00:00:00 2001 From: jez Date: Thu, 26 Feb 2009 14:38:23 +0000 Subject: [PATCH] Windows compatibility fix - it defines min as a macro, so use bracket function call to defeat it --- include/XSLT/impl/xslt_precedence.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/XSLT/impl/xslt_precedence.hpp b/include/XSLT/impl/xslt_precedence.hpp index 6787ba30..c490a5fa 100755 --- a/include/XSLT/impl/xslt_precedence.hpp +++ b/include/XSLT/impl/xslt_precedence.hpp @@ -1,6 +1,8 @@ #ifndef ARABICA_XSLT_PRECEDENCE_HPP #define ARABICA_XSLT_PRECEDENCE_HPP +#include + class Precedence { public: @@ -92,7 +94,7 @@ bool operator<(const Precedence& lhs, const Precedence& rhs) if(lhs.precedence_ == rhs.precedence_) return false; - int len = std::min(lhs.precedence_.size(), rhs.precedence_.size()); + int len = (std::min)(lhs.precedence_.size(), rhs.precedence_.size()); for(int c = 0; c != len; ++c) { if(lhs.precedence_[c] < rhs.precedence_[c])