Commit c0d6f9f2 authored by Chen Bill's avatar Chen Bill Committed by GitHub

use C assert (#584)

parent 18d848e6
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define COMMON_H_ #define COMMON_H_
#include <stdint.h> #include <stdint.h>
#include <assert.h>
typedef unsigned long long uint64; typedef unsigned long long uint64;
typedef unsigned int uint32; typedef unsigned int uint32;
typedef unsigned short uint16; typedef unsigned short uint16;
......
...@@ -27,6 +27,9 @@ duel::duel() { ...@@ -27,6 +27,9 @@ duel::duel() {
game_field = new field(this); game_field = new field(this);
game_field->temp_card = new_card(0); game_field->temp_card = new_card(0);
message_buffer.reserve(SIZE_MESSAGE_BUFFER); message_buffer.reserve(SIZE_MESSAGE_BUFFER);
#ifdef _WIN32
_set_error_mode(_OUT_TO_MSGBOX);
#endif // _WIN32
} }
duel::~duel() { duel::~duel() {
for(auto& pcard : cards) for(auto& pcard : cards)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment