ENH: foamFormatConvert: implement -noConstant argument

This commit is contained in:
mattijs
2011-05-26 12:38:24 +01:00
parent bf062453db
commit 1025e4ddd5

View File

@ -143,7 +143,7 @@ bool writeZones(const word& name, const fileName& meshDir, Time& runTime)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
timeSelector::addOptions(false, false); timeSelector::addOptions();
argList::addBoolOption argList::addBoolOption
( (
"noConstant", "noConstant",
@ -153,14 +153,15 @@ int main(int argc, char *argv[])
# include "addRegionOption.H" # include "addRegionOption.H"
# include "setRootCase.H" # include "setRootCase.H"
// Hack to enable noConstant // enable noConstant by switching
if (!args.optionFound("noConstant")) if (!args.optionFound("noConstant"))
{ {
const_cast<HashTable<string>&>(args.options()).insert args.setOption("constant", "");
( }
"constant", else
"" {
); args.unsetOption("constant");
Info<< "Excluding the constant directory." << nl << endl;
} }