Skip to content

Commit

Permalink
fix(solver): don't use using namespace in hpp files
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Feb 18, 2025
1 parent 34ca32d commit a3133d9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ScAddr StandardMessageReplyAgent::generatePhraseAgentParametersNode(const ScAddr
void StandardMessageReplyAgent::initFields()
{
this->langSearcher = std::make_unique<LanguageSearcher>(&m_context);
this->messageSearcher = std::make_unique<MessageSearcher>(&m_context);
this->messageSearcher = std::make_unique<commonModule::MessageSearcher>(&m_context);
this->messageHandler = std::make_unique<MessageHandler>(&m_context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class StandardMessageReplyAgent : public ScActionInitiatedAgent

std::unique_ptr<LanguageSearcher> langSearcher;
std::unique_ptr<MessageHandler> messageHandler;
std::unique_ptr<MessageSearcher> messageSearcher;
std::unique_ptr<commonModule::MessageSearcher> messageSearcher;

ScAddr generatePhraseAgentParametersNode(const ScAddr & messageNode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MessageHandler::MessageHandler(ScAgentContext * context)
: context(context)
, languageSearcher(std::make_unique<LanguageSearcher>(context))
, messageConstructionsGenerator(std::make_unique<MessageConstructionsGenerator>(context))
, messageSearcher(std::make_unique<MessageSearcher>(context))
, messageSearcher(std::make_unique<commonModule::MessageSearcher>(context))
, phraseSearcher(std::make_unique<PhraseSearcher>(context))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "searcher/PhraseSearcher.hpp"
#include <common/searcher/MessageSearcher.hpp>

using namespace commonModule;

namespace dialogControlModule
{
class MessageHandler
Expand Down Expand Up @@ -36,7 +34,7 @@ class MessageHandler
ScAgentContext * context;
std::unique_ptr<LanguageSearcher> languageSearcher;
std::unique_ptr<MessageConstructionsGenerator> messageConstructionsGenerator;
std::unique_ptr<MessageSearcher> messageSearcher;
std::unique_ptr<commonModule::MessageSearcher> messageSearcher;
std::unique_ptr<PhraseSearcher> phraseSearcher;

void clearSemanticAnswer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "client/WitAiClientInterface.hpp"
#include <common/searcher/MessageSearcher.hpp>

using namespace commonModule;

namespace messageClassificationModule
{
class MessageTopicClassifier
Expand All @@ -21,7 +19,7 @@ class MessageTopicClassifier

ScAddrVector relationsToFindEntity{ScKeynodes::nrel_main_idtf, ScKeynodes::nrel_idtf};

std::unique_ptr<MessageSearcher> messageSearcher;
std::unique_ptr<commonModule::MessageSearcher> messageSearcher;

std::shared_ptr<WitAiClientInterface> client;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const
m_context.EraseElement(agentAnswerLinkIterator->Get(2));
}

messageSearcher = std::make_unique<MessageSearcher>(&m_context);
messageSearcher = std::make_unique<commonModule::MessageSearcher>(&m_context);
std::string messageText = getMessageText(messageAddr);
ScAddr const & entityAddr =
utils::IteratorUtils::getAnyByOutRelation(&m_context, messageAddr, MessageProcessingKeynodes::rrel_entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include <common/searcher/MessageSearcher.hpp>

using namespace commonModule;

namespace messageProcessingModule
{
class FindWordInSetByFirstLetterAgent : public ScActionInitiatedAgent
Expand All @@ -20,6 +18,6 @@ class FindWordInSetByFirstLetterAgent : public ScActionInitiatedAgent

std::string getMessageText(ScAddr const & messageAddr) const;

std::unique_ptr<MessageSearcher> messageSearcher;
std::unique_ptr<commonModule::MessageSearcher> messageSearcher;
};
} // namespace messageProcessingModule

0 comments on commit a3133d9

Please sign in to comment.