From a6309b14b71c037253cec5eee86c58291406685a Mon Sep 17 00:00:00 2001 From: MichaƂ Janiszewski Date: Jun 24 2016 08:35:50 +0000 Subject: Use std::max_element --- diff --git a/toonz/sources/toonzlib/sandor_fxs/SDirection.cpp b/toonz/sources/toonzlib/sandor_fxs/SDirection.cpp index 5a907ae..9dd14c1 100644 --- a/toonz/sources/toonzlib/sandor_fxs/SDirection.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/SDirection.cpp @@ -5,6 +5,7 @@ ////////////////////////////////////////////////////////////////////// #include #include +#include #include "SDirection.h" #include "SError.h" @@ -158,7 +159,7 @@ UCHAR CSDirection::getDir(const int xx, const int yy, UCHAR *sel) { } } if (w == 0) return 0; - short ma = std::max({sum[0], sum[1], sum[2], sum[3]}); + short ma = *std::max_element(sum, sum + 4); double angle = getAngle(sum, ma); // tmsg_info(" - dir - %d, %d, %d, %d angle=%f", sum[0],sum[1],sum[2],sum[3], // angle-50.0);