-fix compil warrnings

This commit is contained in:
Jacek Jendrzej
2013-06-02 13:14:33 +02:00
parent 41aaf96278
commit 0940f4a767

View File

@@ -21,6 +21,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h>
#include <set> #include <set>
#include <map> #include <map>
@@ -171,7 +172,7 @@ void cYTFeedParser::decodeUrl(std::string &url)
void cYTFeedParser::splitString(std::string &str, std::string delim, std::vector<std::string> &strlist, int start) void cYTFeedParser::splitString(std::string &str, std::string delim, std::vector<std::string> &strlist, int start)
{ {
strlist.clear(); strlist.clear();
int end = 0; unsigned int end = 0;
while ((end = str.find(delim, start)) != std::string::npos) { while ((end = str.find(delim, start)) != std::string::npos) {
strlist.push_back(str.substr(start, end - start)); strlist.push_back(str.substr(start, end - start));
start = end + delim.size(); start = end + delim.size();
@@ -181,7 +182,7 @@ void cYTFeedParser::splitString(std::string &str, std::string delim, std::vector
void cYTFeedParser::splitString(std::string &str, std::string delim, std::map<std::string,std::string> &strmap, int start) void cYTFeedParser::splitString(std::string &str, std::string delim, std::map<std::string,std::string> &strmap, int start)
{ {
int end = 0; unsigned int end = 0;
if ((end = str.find(delim, start)) != std::string::npos) { if ((end = str.find(delim, start)) != std::string::npos) {
strmap[str.substr(start, end - start)] = str.substr(end - start + delim.size()); strmap[str.substr(start, end - start)] = str.substr(end - start + delim.size());
} }