Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure

This commit is contained in:
Yehonal
2017-12-21 11:26:43 +01:00
445 changed files with 49192 additions and 15431 deletions

View File

@@ -7,11 +7,9 @@
#ifndef _MMAP_COMMON_H
#define _MMAP_COMMON_H
#include "Common.h"
#include <string>
#include <vector>
#include <ace/OS_NS_sys_time.h>
#include "Define.h"
#ifndef _WIN32
#include <stddef.h>
@@ -53,7 +51,7 @@ namespace MMAP
if (*++filter == '\0') // wildcard at end of filter means all remaing chars match
return true;
while (true)
for (;;)
{
if (*filter == *str)
break;
@@ -125,26 +123,6 @@ namespace MMAP
return LISTFILE_OK;
}
inline uint32 getMSTime()
{
static const ACE_Time_Value ApplicationStartTime = ACE_OS::gettimeofday();
return (ACE_OS::gettimeofday() - ApplicationStartTime).msec();
}
inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime)
{
// getMSTime() have limited data range and this is case when it overflow in this tick
if (oldMSTime > newMSTime)
return (0xFFFFFFFF - oldMSTime) + newMSTime;
else
return newMSTime - oldMSTime;
}
inline uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
{
return getMSTimeDiff(oldMSTime, getMSTime());
}
}
#endif