UI: Use std::gcd for aspect ratio

This removes our own code for gcd, as it is already built into cpp.
This commit is contained in:
Clayton Groeneveld 2021-11-19 04:38:53 -06:00 committed by Jim
parent 0d8c98851e
commit fee5b67bef

View File

@ -294,14 +294,9 @@ static void PopulateAACBitrates(initializer_list<QComboBox *> boxes)
}
}
static int gcd(int a, int b)
{
return b == 0 ? a : gcd(b, a % b);
}
static std::tuple<int, int> aspect_ratio(int cx, int cy)
{
int common = gcd(cx, cy);
int common = std::gcd(cx, cy);
int newCX = cx / common;
int newCY = cy / common;