BUG: corrupt keywords in ensight binary

- regression introduced by ef9a14b288
This commit is contained in:
Mark Olesen 2016-06-30 00:52:49 +02:00
parent ad4e8a1f76
commit c133f98dda
2 changed files with 5 additions and 3 deletions

View File

@ -282,14 +282,15 @@ Foam::Ostream& Foam::ensightFile::writeKeyword(const keyType& key)
{
if (allowUndef_)
{
write(string(key + " undef"));
write(string(static_cast<const string&>(key) + " undef"));
newline();
write(undefValue_);
newline();
}
else
{
write(key);
// ensure we get ensightFile::write(const string&)
write(static_cast<const string&>(key));
newline();
}
return *this;

View File

@ -74,7 +74,8 @@ Foam::ensightGeoFile::~ensightGeoFile()
Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const keyType& key)
{
write(key); newline();
// ensure we get ensightFile::write(const string&)
write(static_cast<const string&>(key)); newline();
return *this;
}