mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
Fix windows naming issue with assert
This commit is contained in:
parent
e986df0579
commit
801ea3f777
@ -3,7 +3,7 @@
|
|||||||
///
|
///
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "Assert.h"
|
#include "CustomAssert.h"
|
||||||
class Client;
|
class Client;
|
||||||
void GParser(Client*c, const std::string&Packet);
|
void GParser(Client*c, const std::string&Packet);
|
||||||
class Buffer{
|
class Buffer{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define SOCKET int
|
#define SOCKET int
|
||||||
#endif
|
#endif
|
||||||
#include "Buffer.h"
|
#include "Buffer.h"
|
||||||
#include "Assert.h"
|
#include "CustomAssert.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@ -706,7 +706,7 @@
|
|||||||
** Define it as a help when debugging C code.
|
** Define it as a help when debugging C code.
|
||||||
*/
|
*/
|
||||||
#if defined(LUA_USE_APICHECK)
|
#if defined(LUA_USE_APICHECK)
|
||||||
#include <assert.h>
|
#include <CustomAssert.h>
|
||||||
#define luai_apicheck(l,e) assert(e)
|
#define luai_apicheck(l,e) assert(e)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
#include <cassert>
|
#include "CustomAssert.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
// ZeroMemory is just a {0} or a memset(addr, 0, len), and it's a macro on MSVC
|
// ZeroMemory is just a {0} or a memset(addr, 0, len), and it's a macro on MSVC
|
||||||
inline void ZeroMemory(void* dst, size_t len) {
|
inline void ZeroMemory(void* dst, size_t len) {
|
||||||
assert(std::memset(dst, 0, len) != nullptr);
|
Assert(std::memset(dst, 0, len) != nullptr);
|
||||||
}
|
}
|
||||||
// provides unix equivalent of closesocket call in win32
|
// provides unix equivalent of closesocket call in win32
|
||||||
inline void closesocket(int socket) {
|
inline void closesocket(int socket) {
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
///
|
///
|
||||||
#include "Security/Enc.h"
|
#include "Security/Enc.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
#include "CustomAssert.h"
|
||||||
//#include <windows.h>
|
//#include <windows.h>
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
int Rand(){
|
int Rand(){
|
||||||
std::random_device r;
|
std::random_device r;
|
||||||
@ -87,7 +87,7 @@ int Dec(int value,int d,int n){
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
int Handle(EXCEPTION_POINTERS *ep,char* Origin){
|
int Handle(EXCEPTION_POINTERS *ep,char* Origin){
|
||||||
assert(false);
|
Assert\(false);
|
||||||
std::stringstream R;
|
std::stringstream R;
|
||||||
R << Sec("Code : ") << std::hex
|
R << Sec("Code : ") << std::hex
|
||||||
<< ep->ExceptionRecord->ExceptionCode
|
<< ep->ExceptionRecord->ExceptionCode
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
///
|
///
|
||||||
#include "Security/Enc.h"
|
#include "Security/Enc.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include "Assert.h"
|
#include "CustomAssert.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
///
|
///
|
||||||
#define CURL_STATICLIB
|
#define CURL_STATICLIB
|
||||||
#include "Curl/curl.h"
|
#include "Curl/curl.h"
|
||||||
#include "Assert.h"
|
#include "CustomAssert.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp){
|
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp){
|
||||||
((std::string*)userp)->append((char*)contents, size * nmemb);
|
((std::string*)userp)->append((char*)contents, size * nmemb);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "Startup.h"
|
#include "Startup.h"
|
||||||
#include "Assert.h"
|
#include "CustomAssert.h"
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
[[noreturn]] void loop(){
|
[[noreturn]] void loop(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user