From 7ba98c75955da7eea594db8ccc14f48c7fd10aa1 Mon Sep 17 00:00:00 2001 From: timhutton Date: Wed, 28 Mar 2012 08:38:44 +0000 Subject: [PATCH] FIX: XML-escaping issue was due to use of old VTK (5.4) --- Ready/BaseRD.cpp | 8 +------- Ready/OpenCL_Formula.cpp | 8 +------- Ready/OpenCL_FullKernel.cpp | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Ready/BaseRD.cpp b/Ready/BaseRD.cpp index f6df8f5b2..e47de1202 100644 --- a/Ready/BaseRD.cpp +++ b/Ready/BaseRD.cpp @@ -382,13 +382,7 @@ vtkSmartPointer BaseRD::GetAsXML() const // description vtkSmartPointer description = vtkSmartPointer::New(); description->SetName("description"); - ostringstream oss; - //#if defined(unix) || defined(__unix__) || defined(__unix) - // vtkXMLUtilities::EncodeString(this->GetDescription().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true); - //#else - oss << this->GetDescription(); - //#endif - description->SetCharacterData(oss.str().c_str(),(int)oss.str().length()); + description->SetCharacterData(this->GetDescription().c_str(),(int)this->GetDescription().length()); rd->AddNestedElement(description); // initial pattern generator diff --git a/Ready/OpenCL_Formula.cpp b/Ready/OpenCL_Formula.cpp index 4ddecf594..53eec5186 100644 --- a/Ready/OpenCL_Formula.cpp +++ b/Ready/OpenCL_Formula.cpp @@ -151,13 +151,7 @@ vtkSmartPointer OpenCL_Formula::GetAsXML() const vtkSmartPointer formula = vtkSmartPointer::New(); formula->SetName("formula"); formula->SetIntAttribute("number_of_chemicals",this->GetNumberOfChemicals()); - ostringstream oss; - //#if defined(unix) || defined(__unix__) || defined(__unix) - // vtkXMLUtilities::EncodeString(this->GetFormula().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true); - //#else - oss << this->GetFormula(); - //#endif - formula->SetCharacterData(oss.str().c_str(),(int)oss.str().length()); + formula->SetCharacterData(this->GetFormula().c_str(),(int)this->GetFormula().length()); rule->AddNestedElement(formula); return rd; diff --git a/Ready/OpenCL_FullKernel.cpp b/Ready/OpenCL_FullKernel.cpp index f8be1ee07..dbf277716 100644 --- a/Ready/OpenCL_FullKernel.cpp +++ b/Ready/OpenCL_FullKernel.cpp @@ -76,13 +76,7 @@ vtkSmartPointer OpenCL_FullKernel::GetAsXML() const kernel->SetIntAttribute("block_size_x",this->block_size[0]); kernel->SetIntAttribute("block_size_y",this->block_size[1]); kernel->SetIntAttribute("block_size_z",this->block_size[2]); - ostringstream oss; - //#if defined(unix) || defined(__unix__) || defined(__unix) - // vtkXMLUtilities::EncodeString(this->GetFormula().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true); - //#else - oss << this->GetFormula(); - //#endif - kernel->SetCharacterData(oss.str().c_str(),(int)oss.str().length()); + kernel->SetCharacterData(this->GetFormula().c_str(),(int)this->GetFormula().length()); rule->AddNestedElement(kernel); return rd;