Skip to content

Commit

Permalink
Merge pull request #342 from ngageoint/fix-cphd-xml-extraction-schema…
Browse files Browse the repository at this point in the history
…-arg

Fix cphd xml extraction schema arg
  • Loading branch information
dstarinshak authored Jun 19, 2020
2 parents fbab858 + ea1d379 commit b79e5da
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions six/modules/c++/samples/extract_cphd_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ int main(int argc, char** argv)
const bool prettyPrint = options->get<bool>("prettyPrint");
std::string basename = options->get<std::string>("basename");
const bool toConsole = options->get<bool>("console");
const std::string inputFile = options->get<std::string> ("cphd");
const std::string schemaFile = options->get<std::string> ("schema");
const std::string inputFile = options->get<std::string>("cphd");
const std::string schemaFile = options->get<std::string>("schema");

// Check for conflicting input
if (!basename.empty() && toConsole)
Expand All @@ -74,7 +74,10 @@ int main(int argc, char** argv)
std::string outPathname = basename + ".xml";

std::vector<std::string> schemaPathnames;
schemaPathnames.push_back(schemaFile);
if (!schemaFile.empty())
{
schemaPathnames.push_back(schemaFile);
}

// Reads in CPHD and verifies XML using schema
cphd::CPHDReader reader(inputFile, sys::OS().getNumCPUs());
Expand Down

0 comments on commit b79e5da

Please sign in to comment.