Skip to content

Commit

Permalink
FIX: f3d --help invalid output #1622
Browse files Browse the repository at this point in the history
  • Loading branch information
Schwarzemann committed Sep 16, 2024
1 parent 743f4f7 commit 2ab2b69
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions application/F3DOptionsTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ void PrintHelpPair(
//----------------------------------------------------------------------------
void PrintHelp(const std::string& execName, const cxxopts::Options& cxxOptions)
{
const std::array<std::pair<std::string_view, std::string_view>, 4> examples = {{
const std::array<std::pair<std::string, std::string>, 4> examples = {{
{ execName + " file.vtu -xtgans",
"View a unstructured mesh in a typical nice looking sciviz style" },
"View an unstructured mesh in a typical nice-looking sciviz style" },
{ execName + " file.glb -tuqap --hdri-file=file.hdr --hdri-ambient --hdri-skybox",
"View a gltf file in a realistic environment" },
{ execName + " file.ply -so --point-size=0 --comp=-2",
Expand All @@ -225,9 +225,10 @@ void PrintHelp(const std::string& execName, const cxxopts::Options& cxxOptions)
}

f3d::log::info("\nExamples:");
for (const auto& [cmd, desc] : examples)
for (const auto& example : examples)
{
::PrintHelpPair(cmd, desc, 50);
f3d::log::info(example.first); // Print the command part
f3d::log::info(" " + example.second); // Print the description part indented
}
f3d::log::info("\nReport bugs to https://github.com/f3d-app/f3d/issues");
f3d::log::setUseColoring(true);
Expand Down

0 comments on commit 2ab2b69

Please sign in to comment.