diff --git a/lib/EdUrlParser/EdUrlParser.cpp b/lib/EdUrlParser/EdUrlParser.cpp index 415283de9..8c26fa667 100644 --- a/lib/EdUrlParser/EdUrlParser.cpp +++ b/lib/EdUrlParser/EdUrlParser.cpp @@ -102,7 +102,7 @@ void EdUrlParser::toHex(char* desthex, char c) { // #prgamas are to ignore warnings about variables being set and not used __BEGIN_IGNORE_UNUSEDVARS -int EdUrlParser::parsePath(vector* folders, string pathstr) { +int EdUrlParser::parsePath(std::vector* folders, string pathstr) { int _url_errorno = 0; int path_pos = 0; size_t pos = 0; @@ -216,11 +216,11 @@ bool EdUrlParser::toChar(const char* hex, char *result) { return true; } -size_t EdUrlParser::parseKeyValueMap(unordered_map *kvmap, const string &rawstr, bool strict) { +size_t EdUrlParser::parseKeyValueMap(std::unordered_map *kvmap, const string &rawstr, bool strict) { return parseKeyValue(rawstr, __kv_callback_map, kvmap, strict); } -size_t EdUrlParser::parseKeyValueList(vector< query_kv_t > *kvvec, const string &rawstr, bool strict) { +size_t EdUrlParser::parseKeyValueList(std::vector< query_kv_t > *kvvec, const string &rawstr, bool strict) { return parseKeyValue(rawstr, __kv_callback_vec, kvvec, strict); } @@ -275,13 +275,13 @@ size_t EdUrlParser::parseKeyValue(const string &rawstr, __kv_callback kvcb, void int __kv_callback_map(void* list, string k, string v) { - auto *map = (unordered_map*)list; + auto *map = (std::unordered_map*)list; (*map)[k] = v; return map->size(); } int __kv_callback_vec(void* list, string k, string v) { - auto *vec = (vector*)list; + auto *vec = (std::vector*)list; query_kv_t t ={k, v}; vec->push_back(t); return vec->size(); @@ -290,4 +290,4 @@ int __kv_callback_vec(void* list, string k, string v) { bool EdUrlParser::isValidUrl() { return !scheme.empty() && !(path.empty() && port.empty()); -} \ No newline at end of file +} diff --git a/lib/EdUrlParser/EdUrlParser.h b/lib/EdUrlParser/EdUrlParser.h index 1b8c7e5d2..282d8df76 100644 --- a/lib/EdUrlParser/EdUrlParser.h +++ b/lib/EdUrlParser/EdUrlParser.h @@ -13,7 +13,7 @@ #include #include -using namespace std; +using std::string; typedef struct { string key; @@ -28,13 +28,13 @@ class EdUrlParser { public: virtual ~EdUrlParser(); static EdUrlParser* parseUrl(const string &urlstr); - static int parsePath(vector *pdirlist, string pathstr); + static int parsePath(std::vector *pdirlist, string pathstr); static string urlDecode(const string &str); static bool toChar(const char* hex, char *result); static string urlEncode(const string &s); static void toHex(char *desthex, char c); - static size_t parseKeyValueMap(unordered_map *kvmap, const string &str, bool strict=true); - static size_t parseKeyValueList(vector< query_kv_t > *kvmap, const string &rawstr, bool strict=true); + static size_t parseKeyValueMap(std::unordered_map *kvmap, const string &str, bool strict=true); + static size_t parseKeyValueList(std::vector< query_kv_t > *kvmap, const string &rawstr, bool strict=true); static size_t parseKeyValue(const string &rawstr, __kv_callback kvcb, void* obj, bool strict); bool isValidUrl(); @@ -52,4 +52,4 @@ class EdUrlParser { string toString() { return scheme + "://" + hostName + (port.empty() ? "" : (":" + port)) + path + (query.empty() ? "" : "?" + query) + (fragment.empty() ? "" : "#" + fragment); } }; -#endif /* EDURLPARSER_H_ */ \ No newline at end of file +#endif /* EDURLPARSER_H_ */