diff --git a/external/3rd/library/platform/projects/MonAPI2/MonitorAPI.cpp b/external/3rd/library/platform/projects/MonAPI2/MonitorAPI.cpp index 9409fdb7..49aeee58 100644 --- a/external/3rd/library/platform/projects/MonAPI2/MonitorAPI.cpp +++ b/external/3rd/library/platform/projects/MonAPI2/MonitorAPI.cpp @@ -564,10 +564,7 @@ dataReplyMessage::dataReplyMessage(const unsigned short command, monMessage(command, sequence, size) { data = new unsigned char[newDataLen]; - if (data) - memcpy(data, newData, newDataLen); - else - data = NULL; + memcpy(data, newData, newDataLen); } //---------------------------------------------------------------- diff --git a/external/3rd/library/soePlatform/CSAssist/projects/CSAssist/CSAssistgameapi/response.cpp b/external/3rd/library/soePlatform/CSAssist/projects/CSAssist/CSAssistgameapi/response.cpp index cd307d8f..adfaa93e 100644 --- a/external/3rd/library/soePlatform/CSAssist/projects/CSAssist/CSAssistgameapi/response.cpp +++ b/external/3rd/library/soePlatform/CSAssist/projects/CSAssist/CSAssistgameapi/response.cpp @@ -112,8 +112,7 @@ ResGetIssueHierarchy::ResGetIssueHierarchy(unsigned track, const void *userData) ResGetIssueHierarchy::~ResGetIssueHierarchy() //---------------------------------------------- { - if (rawStringPtr) - delete [] rawStringPtr; + delete [] rawStringPtr; } //---------------------------------------------- @@ -190,8 +189,7 @@ ResGetTicketComments::ResGetTicketComments(unsigned track, const void *userData) ResGetTicketComments::~ResGetTicketComments() //---------------------------------------------- { - if (mCommentArray != 0) - delete [] mCommentArray; // be sure to free up any resources! + delete [] mCommentArray; // be sure to free up any resources! } //---------------------------------------------- @@ -224,8 +222,7 @@ ResGetTicketByCharacter::ResGetTicketByCharacter(unsigned track, const void *use ResGetTicketByCharacter::~ResGetTicketByCharacter() //---------------------------------------------- { - if (mTicketArray != 0) - delete [] mTicketArray; // be sure to free up any resources! + delete [] mTicketArray; // be sure to free up any resources! } //---------------------------------------------- @@ -259,8 +256,7 @@ ResTicketChange::ResTicketChange(unsigned track) ResTicketChange::~ResTicketChange() //---------------------------------------------- { - if (rawCharacter) - delete [] rawCharacter; + delete [] rawCharacter; } //---------------------------------------------- @@ -329,8 +325,7 @@ rawCharacter(0) ResRequestGameLocation::~ResRequestGameLocation() //---------------------------------------------- { - if (rawCharacter) - delete [] rawCharacter; + delete [] rawCharacter; } //---------------------------------------------- @@ -362,8 +357,7 @@ ResGetDocumentList::ResGetDocumentList(unsigned track, const void *userData) ResGetDocumentList::~ResGetDocumentList() //---------------------------------------------- { - if (mDocumentArray != 0) - delete [] mDocumentArray; // be sure to free up any resources! + delete [] mDocumentArray; // be sure to free up any resources! } //---------------------------------------------- @@ -397,8 +391,7 @@ ResGetDocument::ResGetDocument(unsigned track, const void *userData) ResGetDocument::~ResGetDocument() //---------------------------------------------- { - if (rawDocument) - delete [] rawDocument; + delete [] rawDocument; } //---------------------------------------------- @@ -420,8 +413,7 @@ ResGetTicketXMLBlock::ResGetTicketXMLBlock(unsigned track, const void *userData) ResGetTicketXMLBlock::~ResGetTicketXMLBlock() //---------------------------------------------- { - if (rawXML) - delete [] rawXML; + delete [] rawXML; } //---------------------------------------------- @@ -443,10 +435,8 @@ ResGetKBArticle::ResGetKBArticle(unsigned track, const void *userData) ResGetKBArticle::~ResGetKBArticle() //---------------------------------------------- { - if (rawArticle) - delete [] rawArticle; - if (rawTitle) - delete [] rawTitle; + delete [] rawArticle; + delete [] rawTitle; } //---------------------------------------------- @@ -473,8 +463,7 @@ ResSearchKB::ResSearchKB(unsigned track, const void *userData) ResSearchKB::~ResSearchKB() //---------------------------------------------- { - if (mArticleArray != 0) - delete [] mArticleArray; // be sure to free up any resources! + delete [] mArticleArray; // be sure to free up any resources! } //---------------------------------------------- @@ -507,12 +496,9 @@ rawGame(0), rawVersion(0), rawLanguage(0), mChangeType(CSASSIST_HIERARCHY_NONE) ResHierarchyChange::~ResHierarchyChange() { - if (rawGame) - delete [] rawGame; - if (rawVersion) - delete [] rawVersion; - if (rawLanguage) - delete [] rawLanguage; + delete [] rawGame; + delete [] rawVersion; + delete [] rawLanguage; } //---------------------------------------------- diff --git a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.cpp b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.cpp index c9fabf14..168bc674 100644 --- a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.cpp +++ b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.cpp @@ -273,7 +273,7 @@ namespace soe return asHex(Final()); } - string MD5::asHex(vector achar0) + string MD5::asHex(const vector &achar0) { const string hex = "0123456789abcdef"; diff --git a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.h b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.h index 8f665335..11370702 100644 --- a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.h +++ b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/MD5.h @@ -37,7 +37,7 @@ namespace soe void Update(const std::vector &achar0, int i); void Update(const std::vector &achar0, int i, int j); std::string asHex(); - static std::string asHex(std::vector achar0); + static std::string asHex(const std::vector &achar0); private: std::vector Decode(const std::vector &achar0, int i, int j); diff --git a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/monitorData.cpp b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/monitorData.cpp index abe26a1c..38614bbf 100644 --- a/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/monitorData.cpp +++ b/external/3rd/library/soePlatform/VChatAPI/utils2.0/utils/Base/monitorData.cpp @@ -382,6 +382,7 @@ int CMonitorData::setDescription( int Id, const char *Description , int & mode) int x; size_t sDescP1 = (strlen(Description) + 1); + int retVal = -1; for(x=0;x