Commit 5c673119 authored by mattijs's avatar mattijs
Browse files

BUG: ensightFile: does not handle writeKeyword since no virtual for const word&

Related to #132.
parent 5de8c153
...@@ -182,7 +182,6 @@ Foam::Ostream& Foam::ensightFile::write(const char* value) ...@@ -182,7 +182,6 @@ Foam::Ostream& Foam::ensightFile::write(const char* value)
} }
return *this; return *this;
} }
......
...@@ -144,7 +144,7 @@ public: ...@@ -144,7 +144,7 @@ public:
using Ostream::write; using Ostream::write;
//- Binary write //- Binary write
virtual Ostream& write(const char* buf, std::streamsize count); virtual Ostream& write(const char*, std::streamsize count);
//- Write element keyword with trailing newline, optionally with undef //- Write element keyword with trailing newline, optionally with undef
virtual Ostream& writeKeyword(const keyType&); virtual Ostream& writeKeyword(const keyType&);
...@@ -156,19 +156,19 @@ public: ...@@ -156,19 +156,19 @@ public:
Ostream& writeUndef(); Ostream& writeUndef();
//- Write C-string as "%79s" or as binary (max 80 chars) //- Write C-string as "%79s" or as binary (max 80 chars)
Ostream& write(const char* value); Ostream& write(const char*);
//- Write string as "%79s" or as binary (max 80 chars) //- Write string as "%79s" or as binary (max 80 chars)
Ostream& write(const string& value); Ostream& write(const string&);
//- Write integer as "%10d" or as binary //- Write integer as "%10d" or as binary
Ostream& write(const label value); Ostream& write(const label);
//- Write integer with specified width or as binary //- Write integer with specified width or as binary
Ostream& write(const label value, const label fieldWidth); Ostream& write(const label, const label fieldWidth);
//- Write float as "%12.5e" or as binary //- Write float as "%12.5e" or as binary
Ostream& write(const scalar value); Ostream& write(const scalar);
//- Add carriage return to ascii stream //- Add carriage return to ascii stream
void newline(); void newline();
......
...@@ -25,6 +25,8 @@ License ...@@ -25,6 +25,8 @@ License
#include "ensightGeoFile.H" #include "ensightGeoFile.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::ensightGeoFile::initialize() void Foam::ensightGeoFile::initialize()
...@@ -74,7 +76,10 @@ Foam::ensightGeoFile::~ensightGeoFile() ...@@ -74,7 +76,10 @@ Foam::ensightGeoFile::~ensightGeoFile()
Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const keyType& key) Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const keyType& key)
{ {
write(key); newline(); // Note: make sure to hit ensightFile::write(const string&)
write(string(key));
newline();
return *this; return *this;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment