From ee9134f129672068403f488e9a326411ca9cc1b1 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Sun, 22 Sep 2002 17:07:43 +0000 Subject: removed several static's --- cpp/src/IceXML/StreamI.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'cpp/src/IceXML/StreamI.cpp') diff --git a/cpp/src/IceXML/StreamI.cpp b/cpp/src/IceXML/StreamI.cpp index 0dd8abaa73b..916a61aaff6 100644 --- a/cpp/src/IceXML/StreamI.cpp +++ b/cpp/src/IceXML/StreamI.cpp @@ -999,8 +999,7 @@ IceXML::StreamI::readString(const string& name) } else { - static const string empty(""); - value = empty; + value = ""; } endRead(); @@ -1169,9 +1168,7 @@ IceXML::StreamI::readObject(const string& name, const string& signatureType, con } else { - static const string iceObject("::Ice::Object"); - - if(type == iceObject) + if(type == "::Ice::Object") { value = new ::Ice::Object; } @@ -1316,8 +1313,8 @@ IceXML::StreamI::writeObjectData(const string& name, const string& id, const Ice // typeId = obj->ice_id(); - static const string xsdPrefix = "_internal."; - static const string xsdSuffix = "Type"; + const string xsdPrefix = "_internal."; + const string xsdSuffix = "Type"; xsdType.reserve(typeId.size() + xsdPrefix.size() + xsdSuffix.size()); xsdType += xsdPrefix; unsigned int i = 0; @@ -1362,25 +1359,21 @@ IceXML::StreamI::writeObjectData(const string& name, const string& id, const Ice void IceXML::StreamI::readAttributes(::std::string& id, ::std::string& type, ::std::string& href) { - static const string idStr("id"); - static const string typeStr("type"); - static const string hrefStr("href"); - DOMNamedNodeMap* attributes = _input->current->getAttributes(); int attrCount = attributes->getLength(); for(int i = 0; i < attrCount; i++) { DOMNode* attribute = attributes->item(i); string name = toString(attribute->getNodeName()); - if(name == idStr) + if(name == "id") { id = toString(attribute->getNodeValue()); } - else if(name == typeStr) + else if(name == "type") { type = toString(attribute->getNodeValue()); } - else if(name == hrefStr) + else if(name == "href") { href = toString(attribute->getNodeValue()); } @@ -1390,15 +1383,13 @@ IceXML::StreamI::readAttributes(::std::string& id, ::std::string& type, ::std::s ::Ice::Int IceXML::StreamI::readLength() { - static const string lengthStr("length"); - DOMNamedNodeMap* attributes = _input->current->getAttributes(); int attrCount = attributes->getLength(); for(int i = 0; i < attrCount; i++) { DOMNode* attribute = attributes->item(i); string name = toString(attribute->getNodeName()); - if(name == lengthStr) + if(name == "length") { return atoi(toString(attribute->getNodeValue()).c_str()); } -- cgit v1.2.3