From dabdb0bfaf63d55ec72c678332e5153c19cdcc4b Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 29 Aug 2018 18:53:02 +0300 Subject: [PATCH] Get rid of deprecated Messages::push_back() --- apps/opencs/model/doc/messages.cpp | 5 ----- apps/opencs/model/doc/messages.hpp | 3 --- apps/opencs/model/tools/referenceablecheck.cpp | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/opencs/model/doc/messages.cpp b/apps/opencs/model/doc/messages.cpp index 76bbb6f227..b70d44eda3 100644 --- a/apps/opencs/model/doc/messages.cpp +++ b/apps/opencs/model/doc/messages.cpp @@ -35,11 +35,6 @@ void CSMDoc::Messages::add (const CSMWorld::UniversalId& id, const std::string& mMessages.push_back (Message (id, message, hint, severity)); } -void CSMDoc::Messages::push_back (const std::pair& data) -{ - add (data.first, data.second); -} - CSMDoc::Messages::Iterator CSMDoc::Messages::begin() const { return mMessages.begin(); diff --git a/apps/opencs/model/doc/messages.hpp b/apps/opencs/model/doc/messages.hpp index 4041e1a678..671ded82a0 100644 --- a/apps/opencs/model/doc/messages.hpp +++ b/apps/opencs/model/doc/messages.hpp @@ -56,9 +56,6 @@ namespace CSMDoc const std::string& hint = "", Message::Severity severity = Message::Severity_Default); - /// \deprecated Use add instead. - void push_back (const std::pair& data); - Iterator begin() const; Iterator end() const; diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index 4d68c93cde..def6dece38 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -737,7 +737,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( } if (npc.mHead.empty()) - messages.push_back (std::make_pair (id, "Head is missing")); + messages.add(id, "Head is missing", "", CSMDoc::Message::Severity_Error); else { if (mBodyParts.searchId(npc.mHead) == -1) @@ -746,7 +746,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( } if (npc.mHair.empty()) - messages.push_back (std::make_pair (id, "Hair is missing")); + messages.add(id, "Hair is missing", "", CSMDoc::Message::Severity_Error); else { if (mBodyParts.searchId(npc.mHair) == -1)