mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +00:00
refactor(Core/Common): restyle tools with astyle (#3706)
This commit is contained in:
@@ -82,7 +82,7 @@ void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime
|
||||
|
||||
uint64 EventProcessor::CalculateTime(uint64 t_offset) const
|
||||
{
|
||||
return(m_time + t_offset);
|
||||
return (m_time + t_offset);
|
||||
}
|
||||
|
||||
uint64 EventProcessor::CalculateQueueTime(uint64 delay) const
|
||||
|
||||
@@ -360,7 +360,7 @@ size_t utf8length(std::string& utf8str)
|
||||
{
|
||||
return utf8::distance(utf8str.c_str(), utf8str.c_str() + utf8str.size());
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
utf8str.clear();
|
||||
return 0;
|
||||
@@ -382,7 +382,7 @@ void utf8truncate(std::string& utf8str, size_t len)
|
||||
char* oend = utf8::utf16to8(wstr.c_str(), wstr.c_str() + wstr.size(), &utf8str[0]);
|
||||
utf8str.resize(oend - (&utf8str[0])); // remove unused tail
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
utf8str.clear();
|
||||
}
|
||||
@@ -397,7 +397,7 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
|
||||
wsize -= out.remaining(); // remaining unused space
|
||||
wstr[wsize] = L'\0';
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
// Replace the converted string with an error message if there is enough space
|
||||
// Otherwise just return an empty string
|
||||
@@ -429,7 +429,7 @@ bool Utf8toWStr(const std::string& utf8str, std::wstring& wstr)
|
||||
{
|
||||
utf8::utf8to16(utf8str.c_str(), utf8str.c_str() + utf8str.size(), std::back_inserter(wstr));
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
wstr.clear();
|
||||
return false;
|
||||
@@ -452,7 +452,7 @@ bool WStrToUtf8(wchar_t* wstr, size_t size, std::string& utf8str)
|
||||
}
|
||||
utf8str = utf8str2;
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
utf8str.clear();
|
||||
return false;
|
||||
@@ -475,7 +475,7 @@ bool WStrToUtf8(std::wstring const& wstr, std::string& utf8str)
|
||||
}
|
||||
utf8str = utf8str2;
|
||||
}
|
||||
catch(std::exception const&)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
utf8str.clear();
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <map>
|
||||
#include <ace/INET_Addr.h>
|
||||
|
||||
// Searcher for map of structs
|
||||
// Searcher for map of structs
|
||||
template<typename T, class S> struct Finder
|
||||
{
|
||||
T val_;
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
part[0] == right.part[0] &&
|
||||
part[1] == right.part[1] &&
|
||||
part[2] == right.part[2]
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
inline bool operator!=(flag96 const& right) const
|
||||
@@ -541,20 +541,20 @@ bool CompareValues(ComparisionType type, T val1, T val2)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case COMP_TYPE_EQ:
|
||||
return val1 == val2;
|
||||
case COMP_TYPE_HIGH:
|
||||
return val1 > val2;
|
||||
case COMP_TYPE_LOW:
|
||||
return val1 < val2;
|
||||
case COMP_TYPE_HIGH_EQ:
|
||||
return val1 >= val2;
|
||||
case COMP_TYPE_LOW_EQ:
|
||||
return val1 <= val2;
|
||||
default:
|
||||
// incorrect parameter
|
||||
ABORT();
|
||||
return false;
|
||||
case COMP_TYPE_EQ:
|
||||
return val1 == val2;
|
||||
case COMP_TYPE_HIGH:
|
||||
return val1 > val2;
|
||||
case COMP_TYPE_LOW:
|
||||
return val1 < val2;
|
||||
case COMP_TYPE_HIGH_EQ:
|
||||
return val1 >= val2;
|
||||
case COMP_TYPE_LOW_EQ:
|
||||
return val1 <= val2;
|
||||
default:
|
||||
// incorrect parameter
|
||||
ABORT();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user