compiler fixes, apparently using [] as intended is ambiguous ...
This commit is contained in:
parent
ac03162cc2
commit
4e484ae2a4
@ -21,6 +21,7 @@
|
|||||||
#include "icon.h"
|
#include "icon.h"
|
||||||
#endif
|
#endif
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#ifndef WIN
|
#ifndef WIN
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -775,7 +775,7 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
|||||||
|
|
||||||
//Notifications from server
|
//Notifications from server
|
||||||
Json::Value notificationsArray = objDocument["Notifications"];
|
Json::Value notificationsArray = objDocument["Notifications"];
|
||||||
for(size_t j = 0; j < notificationsArray.size(); j++)
|
for (Json::UInt j = 0; j < notificationsArray.size(); j++)
|
||||||
{
|
{
|
||||||
std::string notificationLink = notificationsArray[j]["Link"].asString();
|
std::string notificationLink = notificationsArray[j]["Link"].asString();
|
||||||
std::string notificationText = notificationsArray[j]["Text"].asString();
|
std::string notificationText = notificationsArray[j]["Text"].asString();
|
||||||
@ -1381,7 +1381,7 @@ LoginStatus Client::Login(std::string username, std::string password, User & use
|
|||||||
std::string userElevationTemp = objDocument["Elevation"].asString();
|
std::string userElevationTemp = objDocument["Elevation"].asString();
|
||||||
|
|
||||||
Json::Value notificationsArray = objDocument["Notifications"];
|
Json::Value notificationsArray = objDocument["Notifications"];
|
||||||
for (size_t j = 0; j < notificationsArray.size(); j++)
|
for (Json::UInt j = 0; j < notificationsArray.size(); j++)
|
||||||
{
|
{
|
||||||
std::string notificationLink = notificationsArray[j]["Link"].asString();
|
std::string notificationLink = notificationsArray[j]["Link"].asString();
|
||||||
std::string notificationText = notificationsArray[j]["Text"].asString();
|
std::string notificationText = notificationsArray[j]["Text"].asString();
|
||||||
@ -1608,7 +1608,7 @@ SaveInfo * Client::GetSave(int saveID, int saveDate)
|
|||||||
|
|
||||||
Json::Value tagsArray = objDocument["Tags"];
|
Json::Value tagsArray = objDocument["Tags"];
|
||||||
std::list<std::string> tempTags;
|
std::list<std::string> tempTags;
|
||||||
for (size_t j = 0; j < tagsArray.size(); j++)
|
for (Json::UInt j = 0; j < tagsArray.size(); j++)
|
||||||
tempTags.push_back(tagsArray[j].asString());
|
tempTags.push_back(tagsArray[j].asString());
|
||||||
|
|
||||||
SaveInfo * tempSave = new SaveInfo(tempID, tempDate, tempScoreUp, tempScoreDown,
|
SaveInfo * tempSave = new SaveInfo(tempID, tempDate, tempScoreUp, tempScoreDown,
|
||||||
@ -1671,7 +1671,7 @@ RequestBroker::Request * Client::GetSaveAsync(int saveID, int saveDate)
|
|||||||
|
|
||||||
Json::Value tagsArray = objDocument["Tags"];
|
Json::Value tagsArray = objDocument["Tags"];
|
||||||
std::list<std::string> tempTags;
|
std::list<std::string> tempTags;
|
||||||
for (size_t j = 0; j < tagsArray.size(); j++)
|
for (Json::UInt j = 0; j < tagsArray.size(); j++)
|
||||||
tempTags.push_back(tagsArray[j].asString());
|
tempTags.push_back(tagsArray[j].asString());
|
||||||
|
|
||||||
SaveInfo * tempSave = new SaveInfo(tempID, tempDate, tempScoreUp, tempScoreDown,
|
SaveInfo * tempSave = new SaveInfo(tempID, tempDate, tempScoreUp, tempScoreDown,
|
||||||
@ -1710,7 +1710,7 @@ RequestBroker::Request * Client::GetCommentsAsync(int saveID, int start, int cou
|
|||||||
Json::Value commentsArray;
|
Json::Value commentsArray;
|
||||||
dataStream >> commentsArray;
|
dataStream >> commentsArray;
|
||||||
|
|
||||||
for (size_t j = 0; j < commentsArray.size(); j++)
|
for (Json::UInt j = 0; j < commentsArray.size(); j++)
|
||||||
{
|
{
|
||||||
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
||||||
std::string username = commentsArray[j]["Username"].asString();
|
std::string username = commentsArray[j]["Username"].asString();
|
||||||
@ -1767,7 +1767,7 @@ std::vector<std::pair<std::string, int> > * Client::GetTags(int start, int count
|
|||||||
|
|
||||||
resultCount = objDocument["TagTotal"].asInt();
|
resultCount = objDocument["TagTotal"].asInt();
|
||||||
Json::Value tagsArray = objDocument["Tags"];
|
Json::Value tagsArray = objDocument["Tags"];
|
||||||
for (size_t j = 0; j < tagsArray.size(); j++)
|
for (Json::UInt j = 0; j < tagsArray.size(); j++)
|
||||||
{
|
{
|
||||||
int tagCount = tagsArray[j]["Count"].asInt();
|
int tagCount = tagsArray[j]["Count"].asInt();
|
||||||
std::string tag = tagsArray[j]["Tag"].asString();
|
std::string tag = tagsArray[j]["Tag"].asString();
|
||||||
@ -1833,7 +1833,7 @@ std::vector<SaveInfo*> * Client::SearchSaves(int start, int count, std::string q
|
|||||||
|
|
||||||
resultCount = objDocument["Count"].asInt();
|
resultCount = objDocument["Count"].asInt();
|
||||||
Json::Value savesArray = objDocument["Saves"];
|
Json::Value savesArray = objDocument["Saves"];
|
||||||
for (size_t j = 0; j < savesArray.size(); j++)
|
for (Json::UInt j = 0; j < savesArray.size(); j++)
|
||||||
{
|
{
|
||||||
int tempID = savesArray[j]["ID"].asInt();
|
int tempID = savesArray[j]["ID"].asInt();
|
||||||
int tempDate = savesArray[j]["Date"].asInt();
|
int tempDate = savesArray[j]["Date"].asInt();
|
||||||
@ -1902,7 +1902,7 @@ std::list<std::string> * Client::RemoveTag(int saveID, std::string tag)
|
|||||||
|
|
||||||
Json::Value tagsArray = responseObject["Tags"];
|
Json::Value tagsArray = responseObject["Tags"];
|
||||||
tags = new std::list<std::string>();
|
tags = new std::list<std::string>();
|
||||||
for (size_t j = 0; j < tagsArray.size(); j++)
|
for (Json::UInt j = 0; j < tagsArray.size(); j++)
|
||||||
tags->push_back(tagsArray[j].asString());
|
tags->push_back(tagsArray[j].asString());
|
||||||
}
|
}
|
||||||
catch (std::exception &e)
|
catch (std::exception &e)
|
||||||
@ -1944,7 +1944,7 @@ std::list<std::string> * Client::AddTag(int saveID, std::string tag)
|
|||||||
|
|
||||||
Json::Value tagsArray = responseObject["Tags"];
|
Json::Value tagsArray = responseObject["Tags"];
|
||||||
tags = new std::list<std::string>();
|
tags = new std::list<std::string>();
|
||||||
for (size_t j = 0; j < tagsArray.size(); j++)
|
for (Json::UInt j = 0; j < tagsArray.size(); j++)
|
||||||
tags->push_back(tagsArray[j].asString());
|
tags->push_back(tagsArray[j].asString());
|
||||||
}
|
}
|
||||||
catch (std::exception & e)
|
catch (std::exception & e)
|
||||||
|
Loading…
Reference in New Issue
Block a user