Commit 6db38e95 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Merge minor performance improvements.

parents ae817cd9 5bae0794
...@@ -109,6 +109,9 @@ XdmfArrayType::XdmfArrayType(const std::string & name, ...@@ -109,6 +109,9 @@ XdmfArrayType::XdmfArrayType(const std::string & name,
mName(name), mName(name),
mPrecision(precision) mPrecision(precision)
{ {
std::stringstream precisionString;
precisionString << precision;
mPrecisionString = precisionString.str();
} }
XdmfArrayType::~XdmfArrayType() XdmfArrayType::~XdmfArrayType()
...@@ -193,7 +196,5 @@ void ...@@ -193,7 +196,5 @@ void
XdmfArrayType::getProperties(std::map<std::string, std::string> & collectedProperties) const XdmfArrayType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties.insert(std::make_pair("DataType", mName)); collectedProperties.insert(std::make_pair("DataType", mName));
std::stringstream precision; collectedProperties.insert(std::make_pair("Precision", mPrecisionString));
precision << mPrecision;
collectedProperties.insert(std::make_pair("Precision", precision.str()));
} }
...@@ -111,8 +111,9 @@ private: ...@@ -111,8 +111,9 @@ private:
static shared_ptr<const XdmfArrayType> static shared_ptr<const XdmfArrayType>
New(const std::map<std::string, std::string> & itemProperties); New(const std::map<std::string, std::string> & itemProperties);
std::string mName; const std::string mName;
unsigned int mPrecision; const unsigned int mPrecision;
std::string mPrecisionString;
}; };
#endif /* XDMFARRAYTYPE_HPP_ */ #endif /* XDMFARRAYTYPE_HPP_ */
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