From f8c88fa4b7b9b2d59f48d0e33f1344196a06f5da Mon Sep 17 00:00:00 2001 From: lianah Date: Thu, 10 Jan 2013 20:44:58 -0500 Subject: fixed most bugs and added paranoid assertions --- src/util/utility.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/util/utility.h') diff --git a/src/util/utility.h b/src/util/utility.h index 72213764f..2084ccafb 100644 --- a/src/util/utility.h +++ b/src/util/utility.h @@ -70,8 +70,9 @@ inline InputIterator find_if_unique(InputIterator first, InputIterator last, Pre template inline T gcd(T a, T b) { while (b != 0) { - a = b; - b = a % b; + T t = b; + b = a % t; + a = t; } return a; } -- cgit v1.2.3