Skip to content

Commit

Permalink
Move check to better place
Browse files Browse the repository at this point in the history
  • Loading branch information
richeldichel committed Oct 15, 2024
1 parent 8c70ced commit 8b0b07e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions KGeoBag/Source/Core/Source/KGInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ void KGInterface::RetrieveSurfacesBySpecifier(vector<KGSurface*>& anAccumulator,
vector<string> tPathList;
boost::split(tPathList, aSpecifier, boost::is_any_of(sSeparator));

if (aSpecifier.find_first_of(sTag) == 0){
coremsg(eWarning) << "Path definition for surfaces just contains a tag, which can make it ambiguous: <" << aSpecifier << ">. Please specify a distinct geometry path!" << eom;
}

coremsg_debug(" retrieving surfaces for specifier <" << aSpecifier << "> at <" << aNode->GetName() << ">" << eom);

for (auto& tPath : tPathList) {
Expand All @@ -164,10 +160,6 @@ void KGInterface::RetrieveSpacesBySpecifier(vector<KGSpace*>& anAccumulator, KGS
vector<string> tPathList;
boost::split(tPathList, aSpecifier, boost::is_any_of(sSeparator));

if (aSpecifier.find_first_of(sTag) == 0){
coremsg(eWarning) << "Path definition for spaces just contains a tag, which can make it ambiguous: <" << aSpecifier << ">. Please specify a distinct geometry path!" << eom;
}

coremsg_debug(" retrieving spaces for specifier <" << aSpecifier << "> at <" << aNode->GetName() << ">" << eom);

for (auto& tPath : tPathList) {
Expand All @@ -187,6 +179,10 @@ void KGInterface::RetrieveSurfacesByPath(vector<KGSurface*>& anAccumulator, KGSp

if (tNestPos == string::npos) {
if (tHead.find_first_of(sTag) == 0) {
if (aNode == fRoot){
coremsg(eWarning) << "Path definition for surfaces just contains a tag, which can make it ambiguous: <" << aPath << ">. Please specify a distinct geometry path!" << eom;
}

string tTag;
int tRecursion;

Expand Down Expand Up @@ -318,6 +314,10 @@ void KGInterface::RetrieveSpacesByPath(vector<KGSpace*>& anAccumulator, KGSpace*

if (tNestPos == string::npos) {
if (tHead.find_first_of(sTag) == 0) {
if (aNode == fRoot){
coremsg(eWarning) << "Path definition for spaces just contains a tag, which can make it ambiguous: <" << aPath << ">. Please specify a distinct geometry path!" << eom;
}

string tTag;
int tRecursion;

Expand Down

0 comments on commit 8b0b07e

Please sign in to comment.