diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-29 23:08:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-24 00:29:31 +0100 |
| commit | 53dfc4a34d74cb415ca19e9221e16567d9381661 (patch) | |
| tree | 2e6497ad1030cb3e4a7057c7a104996988750eec /src | |
| parent | eda8885c86f7e88ed7439f702831e04551700a8e (diff) | |
Tidy up an if.
Diffstat (limited to 'src')
| -rw-r--r-- | src/text_asset.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/text_asset.cc b/src/text_asset.cc index ff662b69..069f7a2b 100644 --- a/src/text_asset.cc +++ b/src/text_asset.cc @@ -203,8 +203,7 @@ TextAsset::position_align(TextAsset::ParseState& ps, xmlpp::Element const * node ps.v_align = string_to_valign (va.get ()); } - auto zp = optional_number_attribute<float>(node, "Zposition"); - if (zp) { + if (auto zp = optional_number_attribute<float>(node, "Zposition")) { ps.z_position = zp.get() / 100; } } |
