Skip to content

Commit

Permalink
+ improve whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 1, 2014
1 parent 7385919 commit dd3412b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
Expand Up @@ -225,19 +225,19 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)

if (_fineness == UserDefined)
{
isOK = !(load >> val).bad();
isOK = !(load >> val).bad();
if (isOK)
_growthRate = val;
else
load.clear(ios::badbit | load.rdstate());

isOK = !(load >> val).bad();
isOK = !(load >> val).bad();
if (isOK)
_nbSegPerEdge = val;
else
load.clear(ios::badbit | load.rdstate());

isOK = !(load >> val).bad();
isOK = !(load >> val).bad();
if (isOK)
_nbSegPerRadius = val;
else
Expand Down
Expand Up @@ -554,7 +554,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
{
case DT_Scale:
{
isOK = !(load >> b).bad();
isOK = !(load >> b).bad();
if (isOK)
_scaleFactor = b;
else
Expand All @@ -568,14 +568,14 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
break;
case DT_TabFunc:
{
isOK = !(load >> a).bad();
isOK = !(load >> a).bad();
if (isOK)
{
_table.resize(a, 0.);
int i;
for (i=0; i < _table.size(); i++)
{
isOK = !(load >> b).bad();
isOK = !(load >> b).bad();
if (isOK)
_table[i] = b;
else
Expand All @@ -594,7 +594,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
case DT_ExprFunc:
{
string str;
isOK = !(load >> str).bad();
isOK = !(load >> str).bad();
if (isOK)
_func = str;
else
Expand All @@ -613,7 +613,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)

if (_distrType == DT_TabFunc || _distrType == DT_ExprFunc)
{
isOK = !(load >> a).bad();
isOK = !(load >> a).bad();
if (isOK)
_convMode = a;
else
Expand Down
2 changes: 1 addition & 1 deletion src/App/Application.cpp
Expand Up @@ -912,7 +912,7 @@ void Application::destructObserver(void)
if ( _pConsoleObserverStd ) {
Console().DetachObserver(_pConsoleObserverStd);
delete _pConsoleObserverStd;
_pConsoleObserverStd = 0;
_pConsoleObserverStd = 0;
}
}

Expand Down
18 changes: 10 additions & 8 deletions src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
Expand Up @@ -415,14 +415,16 @@ std::string ViewProviderFemMesh::getElement(const SoDetail* detail) const
// int edge = line_detail->getLineIndex() + 1;
// str << "Edge" << edge;
//}
else if (detail->getTypeId() == SoPointDetail::getClassTypeId()) {
const SoPointDetail* point_detail = static_cast<const SoPointDetail*>(detail);
int idx = point_detail->getCoordinateIndex();
if (idx < vNodeElementIdx.size()) {
int vertex = vNodeElementIdx[point_detail->getCoordinateIndex()];
str << "Node" << vertex;
}else
return "";
else if (detail->getTypeId() == SoPointDetail::getClassTypeId()) {
const SoPointDetail* point_detail = static_cast<const SoPointDetail*>(detail);
int idx = point_detail->getCoordinateIndex();
if (idx < vNodeElementIdx.size()) {
int vertex = vNodeElementIdx[point_detail->getCoordinateIndex()];
str << "Node" << vertex;
}
else {
return std::string();
}
}
}

Expand Down

0 comments on commit dd3412b

Please sign in to comment.