diff --git a/src/.cproject b/src/.cproject index da78fde..8a30209 100644 --- a/src/.cproject +++ b/src/.cproject @@ -32,6 +32,7 @@ + @@ -74,6 +75,7 @@ + @@ -134,7 +136,7 @@ - + @@ -148,9 +150,10 @@ + - + @@ -189,6 +192,7 @@ + @@ -210,7 +214,7 @@ - + @@ -259,9 +263,10 @@ + - + @@ -302,6 +307,7 @@ + @@ -376,9 +382,10 @@ + - + @@ -417,6 +424,7 @@ + @@ -459,10 +467,10 @@ - + - - + + @@ -473,7 +481,7 @@ - + @@ -487,6 +495,7 @@ + @@ -531,6 +540,7 @@ + @@ -553,10 +563,10 @@ - + - + @@ -577,10 +587,10 @@ - + - - + + @@ -605,6 +615,7 @@ + @@ -648,6 +659,7 @@ + @@ -697,6 +709,7 @@ + @@ -707,7 +720,7 @@ - + @@ -721,9 +734,10 @@ + - + @@ -763,6 +777,7 @@ + @@ -784,7 +799,7 @@ - + @@ -808,6 +823,7 @@ + @@ -832,9 +848,10 @@ + - + @@ -873,6 +890,7 @@ + @@ -915,10 +933,10 @@ - - - - + + + + @@ -929,7 +947,7 @@ - + @@ -943,6 +961,7 @@ + @@ -987,6 +1006,7 @@ + @@ -1012,7 +1032,7 @@ - + @@ -1033,7 +1053,7 @@ - + @@ -1095,15 +1115,15 @@ - - - - - - - - - + + + + + + + + + @@ -1155,17 +1175,13 @@ - - - - - - + + @@ -1216,4 +1232,4 @@ - + \ No newline at end of file diff --git a/src/casehandler.h b/src/casehandler.h index 4b42547..34d4000 100644 --- a/src/casehandler.h +++ b/src/casehandler.h @@ -23,7 +23,7 @@ #include -using namespace std; +using std::string; class CaseHandler { diff --git a/src/contexthandler.h b/src/contexthandler.h index 4ee9acb..8a09015 100644 --- a/src/contexthandler.h +++ b/src/contexthandler.h @@ -23,7 +23,7 @@ #include -using namespace std; +using std::string; class ContextMatch { diff --git a/src/housestyle.cpp b/src/housestyle.cpp index 956d22e..831df4d 100644 --- a/src/housestyle.cpp +++ b/src/housestyle.cpp @@ -145,9 +145,9 @@ void HouseStyle::collectRules ( const std::string& fileName, { std::string report = xrr->getIncorrectPatternReport(); if ( report != "" ) - throw runtime_error ( report.c_str() ); + throw std::runtime_error ( report.c_str() ); else - throw runtime_error ( ( const char * ) xrr->getLastError().utf8_str() ); + throw std::runtime_error ( ( const char * ) xrr->getLastError().utf8_str() ); } // add current file to exclude set diff --git a/src/housestylereader.h b/src/housestylereader.h index f472b35..e832846 100644 --- a/src/housestylereader.h +++ b/src/housestylereader.h @@ -28,7 +28,10 @@ #include #include "wrapexpat.h" -using namespace std; +using std::map; +using std::vector; +using std::set; +using std::string; struct HouseStyleReaderData : public ParserData { diff --git a/src/housestylewriter.h b/src/housestylewriter.h index 50755cc..1efbf76 100644 --- a/src/housestylewriter.h +++ b/src/housestylewriter.h @@ -28,7 +28,9 @@ #include "wrapregex.h" #include "contexthandler.h" -using namespace std; +using std::vector; +using std::set; +using std::string; struct HouseStyleWriterData : public ParserData { diff --git a/src/nocasecompare.h b/src/nocasecompare.h index ba5c35b..da977e6 100644 --- a/src/nocasecompare.h +++ b/src/nocasecompare.h @@ -20,7 +20,7 @@ #include -using namespace std; +using std::string; class NoCaseCompare { diff --git a/src/rule.h b/src/rule.h index 1abfbab..62b8cde 100644 --- a/src/rule.h +++ b/src/rule.h @@ -24,7 +24,7 @@ #include #include "wrapregex.h" -using namespace std; +using std::string; class Rule : public WrapRegex { diff --git a/src/wrapexpat.cpp b/src/wrapexpat.cpp index 8621baa..3a39ed1 100644 --- a/src/wrapexpat.cpp +++ b/src/wrapexpat.cpp @@ -28,7 +28,7 @@ WrapExpat::WrapExpat ( const char *encoding, bool nameSpaceAware ) { p = ( nameSpaceAware ) ? XML_ParserCreateNS ( encoding, ( XML_Char ) ':' ) : XML_ParserCreate ( encoding ); if ( p == 0 ) - throw runtime_error ( "WrapExpat::WrapExpat" ); + throw std::runtime_error ( "WrapExpat::WrapExpat" ); } WrapExpat::~WrapExpat() @@ -64,7 +64,7 @@ bool WrapExpat::parse ( const string &buffer, bool isFinal ) pair WrapExpat::getErrorPosition() { - return make_pair ( + return std::make_pair ( XML_GetCurrentLineNumber ( p ),// - 1, XML_GetCurrentColumnNumber ( p ) ); } @@ -74,10 +74,10 @@ wxString WrapExpat::getLastError() if ( !p ) return _ ( "Unable to create parser instance" ); - stringstream ss; + std::stringstream ss; ss << "Error at line "; ss << XML_GetCurrentLineNumber ( p ); - ss << ", column " << XML_GetCurrentColumnNumber ( p ) + 1 << ":" << endl; + ss << ", column " << XML_GetCurrentColumnNumber ( p ) + 1 << ":" << std::endl; ss << XML_ErrorString ( XML_GetErrorCode ( p ) ); return wxString ( ss.str().c_str(), wxConvUTF8 ); } diff --git a/src/wrapexpat.h b/src/wrapexpat.h index e77faec..812b264 100644 --- a/src/wrapexpat.h +++ b/src/wrapexpat.h @@ -28,7 +28,8 @@ #include #include "parserdata.h" -using namespace std; +using std::pair; +using std::string; class WrapExpat { diff --git a/src/wrapregex.h b/src/wrapregex.h index b59b7c6..8cc782f 100644 --- a/src/wrapregex.h +++ b/src/wrapregex.h @@ -32,7 +32,8 @@ #include #include "contexthandler.h" -using namespace std; +using std::vector; +using std::string; class WrapRegex : private boost::noncopyable { diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp index 829b76d..191414d 100644 --- a/src/xmlcopyeditor.cpp +++ b/src/xmlcopyeditor.cpp @@ -281,7 +281,9 @@ bool MyApp::OnInit() case wxLANGUAGE_SPANISH_GUATEMALA: case wxLANGUAGE_SPANISH_HONDURAS: case wxLANGUAGE_SPANISH_MEXICAN: +#if !wxCHECK_VERSION(3, 1, 6) case wxLANGUAGE_SPANISH_MODERN: +#endif case wxLANGUAGE_SPANISH_NICARAGUA: case wxLANGUAGE_SPANISH_PANAMA: case wxLANGUAGE_SPANISH_PARAGUAY: @@ -415,7 +417,7 @@ bool MyApp::OnInit() wxMessageBox ( error, _ ( "Error" ), wxOK | wxICON_ERROR ); return false; } - catch ( exception &e ) + catch ( std::exception &e ) { const char *what; what = e.what(); @@ -470,7 +472,7 @@ bool MyApp::OnExceptionInMainLoop() throw; } #ifdef __WXMSW__ - catch ( bad_alloc& ) + catch ( std::bad_alloc& ) { ::MessageBox ( NULL, @@ -480,7 +482,7 @@ bool MyApp::OnExceptionInMainLoop() return true; } #endif - catch ( exception &e ) + catch ( std::exception &e ) { const char *what; what = e.what(); @@ -2229,7 +2231,7 @@ void MyFrame::OnExport ( wxCommandEvent& event ) WrapTempFileName tempFileName ( doc->getFullFileName() ); - ofstream rawBufferStream ( tempFileName.name().c_str() ); + std::ofstream rawBufferStream ( tempFileName.name().c_str() ); if ( !rawBufferStream ) return; rawBufferStream << rawBufferUtf8; @@ -4846,7 +4848,7 @@ bool MyFrame::saveRawUtf8 ( bool ignoreEncoding, bool isXml ) { - ofstream ofs ( fileNameLocal.c_str(), std::ios::out | std::ios::binary ); + std::ofstream ofs ( fileNameLocal.c_str(), std::ios::out | std::ios::binary ); if ( !ofs ) return false; @@ -5141,7 +5143,7 @@ wxMenuBar *MyFrame::getMenuBar() while ( id <= ID_VALIDATE_PRESET9 && !rngFile.empty() ) { rngUrl = WrapLibxml::FileNameToURL ( rngFile ); - validationPresetMap.insert ( make_pair ( id, rngUrl ) ); + validationPresetMap.insert ( std::make_pair ( id, rngUrl ) ); wxFileName::SplitPath ( rngFile, NULL, NULL, &displayName, NULL ); displayName.Replace ( _T ( ".rng" ), _T ( "" ) ); shortcutString.Printf ( _ ( "\tCtrl+%i" ), ( id - ID_VALIDATE_PRESET1 ) + 1 ); diff --git a/src/xmlcopyeditor.h b/src/xmlcopyeditor.h index 28e8c4d..9c7e957 100644 --- a/src/xmlcopyeditor.h +++ b/src/xmlcopyeditor.h @@ -402,7 +402,6 @@ class MyFrame : public wxFrame std::map validationPresetMap; #ifdef __WXMSW__ struct MyCompare - : public std::binary_function { bool operator() ( const wxString &x, const wxString &y ) const { diff --git a/src/xmlencodinghandler.cpp b/src/xmlencodinghandler.cpp index e36bb38..8d6cad0 100644 --- a/src/xmlencodinghandler.cpp +++ b/src/xmlencodinghandler.cpp @@ -21,6 +21,8 @@ #include #include "xmlencodinghandler.h" +using std::make_pair; + bool XmlEncodingHandler::hasDeclaration ( const std::string& utf8 ) { size_t len = utf8.size(); diff --git a/src/xmlfilterreader.h b/src/xmlfilterreader.h index 78026ee..add0b4b 100644 --- a/src/xmlfilterreader.h +++ b/src/xmlfilterreader.h @@ -28,7 +28,10 @@ #include #include "wrapexpat.h" -using namespace std; +using std::map; +using std::vector; +using std::set; +using std::string; struct FilterData : public ParserData { diff --git a/src/xmlparseschemans.cpp b/src/xmlparseschemans.cpp index 3bef5a0..ebee49c 100644 --- a/src/xmlparseschemans.cpp +++ b/src/xmlparseschemans.cpp @@ -46,7 +46,7 @@ void XMLCALL XmlParseSchemaNs::start ( void *data, while ( *attr ) { - d->attributeVector.push_back ( make_pair ( *attr, * ( attr + 1 ) ) ); + d->attributeVector.push_back ( std::make_pair ( *attr, * ( attr + 1 ) ) ); attr += 2; } XML_StopParser ( d->p, false ); diff --git a/src/xmlrulereader.h b/src/xmlrulereader.h index 6436e6d..db8ce24 100644 --- a/src/xmlrulereader.h +++ b/src/xmlrulereader.h @@ -30,7 +30,8 @@ #include "rule.h" #include "stringset.h" -using namespace std; +using std::vector; +using std::string; class RuleData : public ParserData { diff --git a/src/xmlshallowvalidator.cpp b/src/xmlshallowvalidator.cpp index a4486ca..11a63fc 100644 --- a/src/xmlshallowvalidator.cpp +++ b/src/xmlshallowvalidator.cpp @@ -28,6 +28,8 @@ #include #include "xmlshallowvalidator.h" +using std::make_pair; + XmlShallowValidator::XmlShallowValidator ( std::map > &elementMap, std::map > >