remove trailing whitespaces
This commit is contained in:
@@ -99,8 +99,8 @@ std::string Persistence::encodeAttribute(const std::string& str)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void Persistence::dumpToStream(std::ostream& stream, int compression) {
|
||||
|
||||
void Persistence::dumpToStream(std::ostream& stream, int compression)
|
||||
{
|
||||
//we need to close the zipstream to get a good result, the only way to do this is to delete the ZipWriter.
|
||||
//Hence the scope...
|
||||
{
|
||||
@@ -108,8 +108,8 @@ void Persistence::dumpToStream(std::ostream& stream, int compression) {
|
||||
Base::ZipWriter writer(stream);
|
||||
writer.setLevel(compression);
|
||||
writer.putNextEntry("Persistence.xml");
|
||||
writer.setMode("BinaryBrep");
|
||||
|
||||
writer.setMode("BinaryBrep");
|
||||
|
||||
//save the content (we need to encapsulte it with xml tags to be able to read single element xmls like happen for properties)
|
||||
writer.Stream() << "<Content>" << std::endl;
|
||||
Save(writer);
|
||||
@@ -118,14 +118,14 @@ void Persistence::dumpToStream(std::ostream& stream, int compression) {
|
||||
}
|
||||
}
|
||||
|
||||
void Persistence::restoreFromStream(std::istream& stream) {
|
||||
|
||||
void Persistence::restoreFromStream(std::istream& stream)
|
||||
{
|
||||
zipios::ZipInputStream zipstream(stream);
|
||||
Base::XMLReader reader("", zipstream);
|
||||
|
||||
if (!reader.isValid())
|
||||
throw Base::ValueError("Unable to construct reader");
|
||||
|
||||
|
||||
reader.readElement("Content");
|
||||
Restore(reader);
|
||||
reader.readFiles(zipstream);
|
||||
|
||||
Reference in New Issue
Block a user