aboutsummaryrefslogtreecommitdiff
path: root/src/common/Common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Common.h')
-rw-r--r--src/common/Common.h62
1 files changed, 3 insertions, 59 deletions
diff --git a/src/common/Common.h b/src/common/Common.h
index a37111fcaf9..8b681af3054 100644
--- a/src/common/Common.h
+++ b/src/common/Common.h
@@ -20,42 +20,11 @@
#define TRINITYCORE_COMMON_H
#include "Define.h"
-
-#include <algorithm>
-#include <array>
-#include <exception>
-#include <list>
-#include <map>
#include <memory>
-#include <queue>
-#include <set>
-#include <sstream>
#include <string>
-#include <type_traits>
-#include <unordered_map>
-#include <unordered_set>
-#include <vector>
-#include <numeric>
-
-#include <cmath>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-#include <cerrno>
-#include <csignal>
-
-#include <boost/optional.hpp>
-#include <boost/utility/in_place_factory.hpp>
-#include <boost/functional/hash.hpp>
-
-#include "Debugging/Errors.h"
-
-#include "Threading/LockedQueue.h"
+#include <utility>
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
-# include <ws2tcpip.h>
-
# if TRINITY_COMPILER == TRINITY_COMPILER_INTEL
# if !defined(BOOST_ASIO_HAS_MOVE)
# define BOOST_ASIO_HAS_MOVE
@@ -73,8 +42,6 @@
#if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT
-#include <float.h>
-
#define snprintf _snprintf
#define atoll _atoi64
#define vsnprintf _vsnprintf
@@ -87,8 +54,6 @@
#endif
-inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; }
-
inline unsigned long atoul(char const* str) { return strtoul(str, nullptr, 10); }
inline unsigned long long atoull(char const* str) { return strtoull(str, nullptr, 10); }
@@ -139,9 +104,7 @@ const uint8 OLD_TOTAL_LOCALES = 9; /// @todo convert in simple system
TC_COMMON_API extern char const* localeNames[TOTAL_LOCALES];
-TC_COMMON_API LocaleConstant GetLocaleByName(const std::string& name);
-
-typedef std::vector<std::string> StringVector;
+TC_COMMON_API LocaleConstant GetLocaleByName(std::string const& name);
#pragma pack(push, 1)
@@ -152,7 +115,7 @@ struct TC_COMMON_API LocalizedString
#pragma pack(pop)
-// we always use stdlibc++ std::max/std::min, undefine some not C++ standard defines (Win API and some other platforms)
+// we always use stdlib std::max/std::min, undefine some not C++ standard defines (Win API and some other platforms)
#ifdef max
#undef max
#endif
@@ -167,10 +130,6 @@ struct TC_COMMON_API LocalizedString
#define MAX_QUERY_LEN 32*1024
-//! Optional helper class to wrap optional values within.
-template <typename T>
-using Optional = boost::optional<T>;
-
namespace Trinity
{
//! std::make_unique implementation (TODO: remove this once C++14 is supported)
@@ -181,19 +140,4 @@ namespace Trinity
}
}
-//! Hash implementation for std::pair to allow using pairs in unordered_set or as key for unordered_map
-//! Individual types used in pair must be hashable by boost::hash
-namespace std
-{
- template<class K, class V>
- struct hash<std::pair<K, V>>
- {
- public:
- size_t operator()(std::pair<K, V> const& key) const
- {
- return boost::hash_value(key);
- }
- };
-}
-
#endif