- string cmdname;
- if (params_.type == InsetPhantomParams::Phantom)
- cmdname = "phantom";
- else if (params_.type == InsetPhantomParams::HPhantom)
- cmdname = "phantom";
- else if (params_.type == InsetPhantomParams::VPhantom)
- cmdname = "phantom";
+ docstring cmdname;
+ switch (params_.type) {
+ case InsetPhantomParams::Phantom:
+ case InsetPhantomParams::HPhantom:
+ case InsetPhantomParams::VPhantom:
+ default:
+ cmdname = from_ascii("phantom");
+ break;
+ }