STYLE: consistent lookupOrDefault template parameters

- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
This commit is contained in:
Mark Olesen
2018-03-26 09:09:09 +02:00
parent 568fbf727d
commit 36719bf55b
75 changed files with 161 additions and 163 deletions

View File

@ -70,7 +70,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
// writer options - default is xml base64
//
writeOpts_ = vtk::formatType::INLINE_BASE64;
if (dict.lookupOrDefault<bool>("legacy", false))
if (dict.lookupOrDefault("legacy", false))
{
writeOpts_.legacy(true);
}
@ -99,7 +99,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
//
dict.readIfPresent("directory", dirName_);
writeIds_ = dict.lookupOrDefault<bool>("writeIds", false);
writeIds_ = dict.lookupOrDefault("writeIds", false);
//