summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-12-23 18:14:51 +0100
committerCarl Hetherington <cth@carlh.net>2021-12-23 18:14:51 +0100
commit90730ce9bf3ab9762600f844fcc1b2aeb6d2b22e (patch)
tree4f3669812694a4257ed823988140e34c053a5a9a /src
parentd3be0385139016f72622e1e515af26b8472d59a8 (diff)
Fix mistake in a7f61a15 causing bad_alloc exceptions during tests.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ratio.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ratio.cc b/src/lib/ratio.cc
index aa222b116..5f1a3aa63 100644
--- a/src/lib/ratio.cc
+++ b/src/lib/ratio.cc
@@ -39,6 +39,9 @@ vector<Ratio> Ratio::_ratios;
void
Ratio::setup_ratios ()
{
+ /* This must only be called once as we rely on the addresses of objects in _ratios staying the same */
+ DCPOMATIC_ASSERT (_ratios.empty());
+
_ratios.push_back (Ratio(float(1290) / 1080, "119", _("1.19"), {}, "119"));
_ratios.push_back (Ratio(float(1440) / 1080, "133", _("1.33 (4:3)"), {}, "133"));
_ratios.push_back (Ratio(float(1485) / 1080, "138", _("1.38 (Academy)"), {}, "137"));