mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 08:46:09 +00:00
refactor(src/common): remove unused imports (#19506)
* refactor(src/common): remove unused imports * fix: build * chore: fix build * chore: size_t -> std::size_t * chore: fix fuckup from previous commit * chore: fix build * chore: fix build * chore: fix build * chore: fix build with std::size_t * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build
This commit is contained in:
@@ -26,7 +26,7 @@ void Acore::BroadcastTextBuilder::operator()(WorldPacket& data, LocaleConstant l
|
||||
ChatHandler::BuildChatPacket(data, _msgType, bct ? Language(bct->LanguageID) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale);
|
||||
}
|
||||
|
||||
size_t Acore::BroadcastTextBuilder::operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
std::size_t Acore::BroadcastTextBuilder::operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
{
|
||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId);
|
||||
return ChatHandler::BuildChatPacket(*data, _msgType, bct ? Language(bct->LanguageID) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale);
|
||||
@@ -47,7 +47,7 @@ void Acore::AcoreStringChatBuilder::operator()(WorldPacket& data, LocaleConstant
|
||||
va_list ap;
|
||||
va_copy(ap, *_args);
|
||||
|
||||
static size_t const BufferSize = 2048;
|
||||
static std::size_t const BufferSize = 2048;
|
||||
char strBuffer[BufferSize];
|
||||
vsnprintf(strBuffer, BufferSize, text, ap);
|
||||
va_end(ap);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Acore
|
||||
: _source(obj), _msgType(msgType), _textId(textId), _gender(gender), _target(target), _achievementId(achievementId) { }
|
||||
|
||||
void operator()(WorldPacket& data, LocaleConstant locale) const;
|
||||
size_t operator()(WorldPacket* data, LocaleConstant locale) const;
|
||||
std::size_t operator()(WorldPacket* data, LocaleConstant locale) const;
|
||||
|
||||
private:
|
||||
WorldObject const* _source;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
CreatureTextBuilder(WorldObject* obj, uint8 gender, ChatMsg msgtype, uint8 textGroup, uint32 id, uint32 language, WorldObject const* target)
|
||||
: _source(obj), _gender(gender), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _target(target) { }
|
||||
|
||||
size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
std::size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
{
|
||||
std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _gender, _textGroup, _textId, locale);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
PlayerTextBuilder(WorldObject* obj, WorldObject* speaker, uint8 gender, ChatMsg msgtype, uint8 textGroup, uint32 id, uint32 language, WorldObject const* target)
|
||||
: _source(obj), _talker(speaker), _gender(gender), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _target(target) { }
|
||||
|
||||
size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
std::size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
{
|
||||
std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _gender, _textGroup, _textId, locale);
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
|
||||
~CreatureTextLocalizer()
|
||||
{
|
||||
for (size_t i = 0; i < _packetCache.size(); ++i)
|
||||
for (std::size_t i = 0; i < _packetCache.size(); ++i)
|
||||
{
|
||||
if (_packetCache[i])
|
||||
delete _packetCache[i]->first;
|
||||
@@ -141,14 +141,14 @@ public:
|
||||
{
|
||||
LocaleConstant loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
|
||||
WorldPacket* messageTemplate;
|
||||
size_t whisperGUIDpos;
|
||||
std::size_t whisperGUIDpos;
|
||||
|
||||
// create if not cached yet
|
||||
if (!_packetCache[loc_idx])
|
||||
{
|
||||
messageTemplate = new WorldPacket();
|
||||
whisperGUIDpos = _builder(messageTemplate, loc_idx);
|
||||
_packetCache[loc_idx] = new std::pair<WorldPacket*, size_t>(messageTemplate, whisperGUIDpos);
|
||||
_packetCache[loc_idx] = new std::pair<WorldPacket*, std::size_t>(messageTemplate, whisperGUIDpos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::pair<WorldPacket*, size_t>* > _packetCache;
|
||||
std::vector<std::pair<WorldPacket*, std::size_t>* > _packetCache;
|
||||
Builder const& _builder;
|
||||
ChatMsg _msgType;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user