From bc95a8a7ef5912f89a1406255078e37949060054 Mon Sep 17 00:00:00 2001 From: Arthur Dene Ice Date: Fri, 9 May 2014 19:33:02 -0700 Subject: [PATCH] lots of my_ulongulong explicit conversions --- common/database.cpp | 4 ++-- common/guild_base.cpp | 2 +- zone/bot.cpp | 14 +++++++------- zone/client_packet.cpp | 2 +- zone/trading.cpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index 7744c7f6e..e2a997e4e 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -1025,7 +1025,7 @@ bool Database::LoadVariables_result(MYSQL_RES* result) { varcache_array[i] = 0; } else { - uint32 tmpnewmax = varcache_max + mysql_num_rows(result); + uint32 tmpnewmax = (uint32)varcache_max + mysql_num_rows(result); VarCache_Struct** tmp = new VarCache_Struct*[tmpnewmax]; for (i=0; i 0) // There is a Name! No change (Return False) return false; diff --git a/common/guild_base.cpp b/common/guild_base.cpp index 8dab0f2cb..b93bfc083 100644 --- a/common/guild_base.cpp +++ b/common/guild_base.cpp @@ -1331,7 +1331,7 @@ uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID) } safe_delete_array(query); - uint32 Rows = mysql_num_rows(result); + uint32 Rows = (uint32)mysql_num_rows(result); mysql_free_result(result); return Rows; diff --git a/zone/bot.cpp b/zone/bot.cpp index dc1a63fd3..11f3e1177 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4886,7 +4886,7 @@ std::list Bot::ListSpawnedBots(uint32 characterID, std::string* *errorMessage = std::string(ErrBuf); } else { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -4986,7 +4986,7 @@ std::list Bot::LoadBotGroup(std::string botGroupName, std::string* err *errorMessage = std::string(ErrBuf); } else { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -5025,7 +5025,7 @@ std::list Bot::GetBotGroupListByBotOwnerCharacterId(uint32 botOwne *errorMessage = std::string(ErrBuf); } else { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -5059,7 +5059,7 @@ bool Bot::DoesBotGroupNameExist(std::string botGroupName) { MYSQL_ROW DataRow; if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -5099,7 +5099,7 @@ uint32 Bot::CanLoadBotGroup(uint32 botOwnerCharacterId, std::string botGroupName *errorMessage = std::string(ErrBuf); } else { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -5139,7 +5139,7 @@ uint32 Bot::GetBotGroupIdByBotGroupName(std::string botGroupName, std::string* e *errorMessage = std::string(ErrBuf); } else { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { @@ -5170,7 +5170,7 @@ uint32 Bot::GetBotGroupLeaderIdByBotGroupName(std::string botGroupName) { MYSQL_ROW DataRow; if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupLeaderBotId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) { - uint32 RowCount = mysql_num_rows(DatasetResult); + uint32 RowCount = (uint32)mysql_num_rows(DatasetResult); if(RowCount > 0) { for(int iCounter = 0; iCounter < RowCount; iCounter++) { diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 0ce75ee6c..0ed7305da 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11649,7 +11649,7 @@ void Client::Handle_OP_GMSearchCorpse(const EQApplicationPacket *app) EscSearchString, MaxResults), errbuf, &Result)) { - int NumberOfRows = mysql_num_rows(Result); + int NumberOfRows = (int)mysql_num_rows(Result); if(NumberOfRows == MaxResults) Message(clientMessageError, "Your search found too many results; some are not displayed."); diff --git a/zone/trading.cpp b/zone/trading.cpp index 3c699572f..ab5849bbf 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -2018,7 +2018,7 @@ void Client::SendBuyerResults(char* SearchString, uint32 SearchID) { if (database.RunQuery(Query,MakeAnyLenString(&Query, "select * from buyer where itemname like '%%%s%%' order by charid limit %i", EscSearchString, RuleI(Bazaar, MaxBarterSearchResults)), errbuf, &Result)) { - int NumberOfRows = mysql_num_rows(Result); + int NumberOfRows = (int)mysql_num_rows(Result); if(NumberOfRows == RuleI(Bazaar, MaxBarterSearchResults)) Message(15, "Your search found too many results; some are not displayed.");