Преглед изворни кода

UI: Use std::gcd for aspect ratio

This removes our own code for gcd, as it is already built into cpp.
Clayton Groeneveld пре 3 година
родитељ
комит
fee5b67bef
1 измењених фајлова са 1 додато и 6 уклоњено
  1. 1 6
      UI/window-basic-settings.cpp

+ 1 - 6
UI/window-basic-settings.cpp

@@ -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;