STYLE: avoid unrestricted dictionary lookup in conversion, sampling, surfMesh
- aids with detection of excess tokens (issue #762) - deprecated dictionary::operator[] in favour of the lookup() method which offers more flexibilty and clarity of purpose. Additionally, the read<> and get<> forms should generally be used instead anyhow.
This commit is contained in:
@ -175,8 +175,8 @@ Foam::arraySet::arraySet
|
||||
:
|
||||
sampledSet(name, mesh, searchEngine, dict),
|
||||
coordSys_(dict),
|
||||
pointsDensity_(dict.lookup("pointsDensity")),
|
||||
spanBox_(dict.lookup("spanBox"))
|
||||
pointsDensity_(dict.get<labelVector>("pointsDensity")),
|
||||
spanBox_(dict.get<vector>("spanBox"))
|
||||
{
|
||||
genSamples();
|
||||
}
|
||||
|
||||
@ -47,6 +47,7 @@ SourceFiles
|
||||
#define arraySet_H
|
||||
|
||||
#include "sampledSet.H"
|
||||
#include "labelVector.H"
|
||||
#include "DynamicList.H"
|
||||
#include "coordinateSystem.H"
|
||||
|
||||
@ -73,10 +74,10 @@ class arraySet
|
||||
coordinateSystem coordSys_;
|
||||
|
||||
//- Point density vector
|
||||
Vector<label> pointsDensity_;
|
||||
labelVector pointsDensity_;
|
||||
|
||||
//- Span box
|
||||
Vector<scalar> spanBox_;
|
||||
vector spanBox_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
Reference in New Issue
Block a user