From 245c2b3c45dce1f5f385665e932ee19c9a904081 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 16 Mar 2015 14:22:03 +0100 Subject: [PATCH] InsetPhantom::latex(): use a switch --- src/insets/InsetPhantom.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index c2309bc070..deeb09744a 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -313,13 +313,22 @@ void InsetPhantom::latex(otexstream & os, OutputParams const & runparams) const { if (runparams.moving_arg) os << "\\protect"; - if (params_.type == InsetPhantomParams::Phantom) + + switch (params_.type) { + case InsetPhantomParams::Phantom: os << "\\phantom{"; - else if (params_.type == InsetPhantomParams::HPhantom) + break; + case InsetPhantomParams::HPhantom: os << "\\hphantom{"; - else if (params_.type == InsetPhantomParams::VPhantom) + break; + case InsetPhantomParams::VPhantom: os << "\\vphantom{"; - InsetCollapsable::latex(os, runparams); + break; + default: + os << "\\phantom{"; + break; + } + InsetCollapsable::latex(os, runparams); os << "}"; } -- 2.39.2