From 9e975a46a2edc90299d901c2983d18de6982fa14 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 21 Jul 2017 18:18:45 -0400 Subject: [PATCH] Mildly simplified syntax. --- NumberTheory/Factors.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NumberTheory/Factors.hpp b/NumberTheory/Factors.hpp index 03ffc8593..98832d247 100644 --- a/NumberTheory/Factors.hpp +++ b/NumberTheory/Factors.hpp @@ -9,15 +9,15 @@ #ifndef Factors_hpp #define Factors_hpp +#include + namespace NumberTheory { /*! @returns The greatest common divisor of @c a and @c b as computed by Euclid's algorithm. */ template T greatest_common_divisor(T a, T b) { if(a < b) { - T swap = b; - b = a; - a = swap; + std::swap(a, b); } while(1) {