Skip to content

Commit d678413

Browse files
authored
ofxPoco - remove namespace std (#7337)
#changelog #addons
1 parent febd8cd commit d678413

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

addons/ofxPoco/src/ofxXmlPoco.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#include "ofxXmlPoco.h"
33
#include "Poco/AutoPtr.h"
44

5-
using namespace std;
5+
using std::string;
6+
using std::vector;
67

78
ofxXmlPoco::~ofxXmlPoco(){
89
releaseAll();
910
}
1011

11-
1212
ofxXmlPoco::ofxXmlPoco(const string & path){
1313
document = new Poco::XML::Document(); // we create this so that they can be merged later
1414
element = document->documentElement();
@@ -97,14 +97,14 @@ int ofxXmlPoco::getNumChildren(const string& path) const{
9797
}
9898

9999
string ofxXmlPoco::toString() const{
100-
ostringstream stream;
100+
std::ostringstream stream;
101101

102102
Poco::XML::DOMWriter writer;
103103
writer.setOptions(Poco::XML::XMLWriter::PRETTY_PRINT);
104104
if(document){
105105
try{
106106
writer.writeNode( stream, getPocoDocument() );
107-
}catch( exception & e ){
107+
}catch( std::exception & e ){
108108
ofLogError("ofxXmlPoco") << "toString(): " << e.what();
109109
}
110110
} else if(element){
@@ -604,8 +604,8 @@ bool ofxXmlPoco::exists(const string & path) const{ // works for both attributes
604604
return false;
605605
}
606606

607-
map<string, string> ofxXmlPoco::getAttributes() const{ // works for both attributes and tags
608-
map<string, string> attrMap;
607+
std::map<string, string> ofxXmlPoco::getAttributes() const{ // works for both attributes and tags
608+
std::map<string, string> attrMap;
609609

610610
if(element){
611611
Poco::AutoPtr<Poco::XML::NamedNodeMap> attr = element->attributes();
@@ -724,7 +724,7 @@ bool ofxXmlPoco::loadFromBuffer(const string & buffer){
724724
element = document->documentElement();
725725
return false;
726726
}
727-
catch(const exception & e){
727+
catch(const std::exception & e){
728728
short msg = atoi(e.what());
729729
ofLogError("ofxXmlPoco") << "parse error: " << DOMErrorMessage(msg);
730730
document = new Poco::XML::Document;

0 commit comments

Comments
 (0)