Skip to content

Commit

Permalink
Update avtXdmfFileFormat.C (#19372) (#19380)
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Mar 12, 2024
1 parent 5449a1a commit c33e254
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions src/databases/Xdmf/avtXdmfFileFormat.C
Original file line number Diff line number Diff line change
Expand Up @@ -608,29 +608,15 @@ void avtXdmfFileFormat::GetDims(int exts[6], int dims[3])
// Programmer: Kenneth Leiter
// Creation: March 29, 2010
//
// Modifications
// Mark C. Miller, Fri Mar 8 22:57:05 PST 2024
// Replace space-backslash-escaping logic with expression systems escape
// bracketing. Did space-escaping ever work?
// ****************************************************************************

std::string avtXdmfFileFormat::GetFormattedExpressionName(std::string & attributeName)
{
std::stringstream formatted;

// Deal with whitespace
std::stringstream stream(attributeName);
std::istream_iterator<std::string> it(stream);
std::istream_iterator<std::string> end;
std::vector<std::string> tokens(it, end);

std::vector<std::string>::const_iterator iter = tokens.begin();
if (iter != tokens.end()) {
formatted << *iter;
iter++;
}

for (; iter != tokens.end(); ++iter) {
formatted << "\\ " << *iter;
}

return formatted.str();
return "<" + attributeName + ">";
}

// ****************************************************************************
Expand Down

0 comments on commit c33e254

Please sign in to comment.