From 77f1f58c0a7eb55001b375f1945690ed5c1e87a2 Mon Sep 17 00:00:00 2001 From: tycho Date: Tue, 19 May 2015 19:32:10 +0100 Subject: Make -Werror disabling file only Ad fix a load of warnings --- src/CompositeChat.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/CompositeChat.cpp') diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp index d1eb0b852..c6b89324c 100644 --- a/src/CompositeChat.cpp +++ b/src/CompositeChat.cpp @@ -345,6 +345,10 @@ AString cCompositeChat::ExtractText(void) const Msg.append(((cUrlPart *)(*itr))->m_Url); break; } + case ptShowAchievement: + { + break; + } } // switch (PartType) } // for itr - m_Parts[] return Msg; -- cgit v1.2.3 From dae9e5792a4f030ae9e748548a16a89790fbd311 Mon Sep 17 00:00:00 2001 From: tycho Date: Sun, 24 May 2015 12:56:56 +0100 Subject: Made -Weverything an error. --- src/CompositeChat.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/CompositeChat.cpp') diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp index c6b89324c..5d6c028ab 100644 --- a/src/CompositeChat.cpp +++ b/src/CompositeChat.cpp @@ -342,7 +342,7 @@ AString cCompositeChat::ExtractText(void) const } case ptUrl: { - Msg.append(((cUrlPart *)(*itr))->m_Url); + Msg.append((static_cast(*itr))->m_Url); break; } case ptShowAchievement: @@ -423,7 +423,7 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const case cCompositeChat::ptClientTranslated: { - const cCompositeChat::cClientTranslatedPart & p = (const cCompositeChat::cClientTranslatedPart &)**itr; + const cCompositeChat::cClientTranslatedPart & p = static_cast(**itr); Part["translate"] = p.m_Text; Json::Value With; for (AStringVector::const_iterator itrW = p.m_Parameters.begin(), endW = p.m_Parameters.end(); itrW != endW; ++itr) @@ -440,7 +440,7 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const case cCompositeChat::ptUrl: { - const cCompositeChat::cUrlPart & p = (const cCompositeChat::cUrlPart &)**itr; + const cCompositeChat::cUrlPart & p = static_cast(**itr); Part["text"] = p.m_Text; Json::Value Url; Url["action"] = "open_url"; @@ -453,7 +453,7 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const case cCompositeChat::ptSuggestCommand: case cCompositeChat::ptRunCommand: { - const cCompositeChat::cCommandPart & p = (const cCompositeChat::cCommandPart &)**itr; + const cCompositeChat::cCommandPart & p = static_cast(**itr); Part["text"] = p.m_Text; Json::Value Cmd; Cmd["action"] = (p.m_PartType == cCompositeChat::ptRunCommand) ? "run_command" : "suggest_command"; @@ -465,7 +465,7 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const case cCompositeChat::ptShowAchievement: { - const cCompositeChat::cShowAchievementPart & p = (const cCompositeChat::cShowAchievementPart &)**itr; + const cCompositeChat::cShowAchievementPart & p = static_cast(**itr); Part["translate"] = "chat.type.achievement"; Json::Value Ach; -- cgit v1.2.3