X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fsymmetry.cpp;h=215a48a08d78ae88ea8cee7052490eb2a72f85b3;hb=b84032466e31ff23d4be3b81a3f535b2c70202e5;hp=e48e269851e0846442bbbc1975928348e8d24271;hpb=e485c265061056d29de6fb252cd82ebedd41ec41;p=ginac.git diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index e48e2698..215a48a0 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's symmetry definitions. */ /* - * GiNaC Copyright (C) 1999-2006 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include #include #include +#include #include "symmetry.h" #include "lst.h" @@ -431,7 +432,7 @@ int canonicalize(exvector::iterator v, const symmetry &symm) { // Less than two elements? Then do nothing if (symm.indices.size() < 2) - return INT_MAX; + return std::numeric_limits::max(); // Canonicalize children first bool something_changed = false; @@ -442,7 +443,7 @@ int canonicalize(exvector::iterator v, const symmetry &symm) int child_sign = canonicalize(v, ex_to(*first)); if (child_sign == 0) return 0; - if (child_sign != INT_MAX) { + if (child_sign != std::numeric_limits::max()) { something_changed = true; sign *= child_sign; } @@ -469,7 +470,7 @@ int canonicalize(exvector::iterator v, const symmetry &symm) default: break; } - return something_changed ? sign : INT_MAX; + return something_changed ? sign : std::numeric_limits::max(); }