mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Misc: Added a include hack for msvc <chrono> to use only c++17 bits from it
(cherry picked from commit 585900f42d)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "AppenderFile.h"
|
||||
#include "Common.h"
|
||||
#include "Config.h"
|
||||
#include "Duration.h"
|
||||
#include "Errors.h"
|
||||
#include "Logger.h"
|
||||
#include "LogMessage.h"
|
||||
@@ -27,7 +28,6 @@
|
||||
#include "Strand.h"
|
||||
#include "StringConvert.h"
|
||||
#include "Util.h"
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
|
||||
Log::Log() : AppenderId(0), lowestLogLevel(LOG_LEVEL_FATAL), _ioContext(nullptr), _strand(nullptr)
|
||||
|
||||
@@ -23,14 +23,15 @@
|
||||
*/
|
||||
|
||||
#include "Define.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace ByteConverter
|
||||
{
|
||||
template<size_t T>
|
||||
inline void convert(char *val)
|
||||
{
|
||||
std::swap(*val, *(val + T - 1));
|
||||
char tmp = *val;
|
||||
*val = *(val + T - 1);
|
||||
*(val + T - 1) = tmp;
|
||||
convert<T - 2>(val + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
#ifndef _DURATION_H_
|
||||
#define _DURATION_H_
|
||||
|
||||
// HACKS TERRITORY
|
||||
#if __has_include(<__msvc_chrono.hpp>)
|
||||
#include <__msvc_chrono.hpp> // skip all the formatting/istream/locale/mutex bloat
|
||||
#else
|
||||
#include <chrono>
|
||||
#endif
|
||||
|
||||
/// Milliseconds shorthand typedef.
|
||||
typedef std::chrono::milliseconds Milliseconds;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "Optional.h"
|
||||
#include "Random.h"
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
Reference in New Issue
Block a user