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

Patch1 (#2635)

* update include in network.h

* format
parent 4ef45c84
#include "config.h"
#include "duelclient.h" #include "duelclient.h"
#include "client_card.h" #include "client_card.h"
#include "materials.h" #include "materials.h"
#include "image_manager.h" #include "image_manager.h"
#include "sound_manager.h" #include "sound_manager.h"
#include "single_mode.h" #include "single_mode.h"
#include "../ocgcore/common.h"
#include "game.h" #include "game.h"
#include "deck_manager.h"
#include "replay.h" #include "replay.h"
#include "replay_mode.h"
#include <thread> #include <thread>
namespace ygo { namespace ygo {
......
#ifndef DUELCLIENT_H #ifndef DUELCLIENT_H
#define DUELCLIENT_H #define DUELCLIENT_H
#include "config.h"
#include <vector> #include <vector>
#include <set> #include <set>
#include <utility>
#include "network.h" #include "network.h"
#include "data_manager.h"
#include "deck_manager.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
namespace ygo { namespace ygo {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "data_manager.h" #include "data_manager.h"
#include "image_manager.h" #include "image_manager.h"
#include "sound_manager.h" #include "sound_manager.h"
#include "deck_manager.h"
#include "replay_mode.h" #include "replay_mode.h"
#include "single_mode.h" #include "single_mode.h"
#include "materials.h" #include "materials.h"
......
#include "config.h"
#include "netserver.h" #include "netserver.h"
#include "single_duel.h" #include "single_duel.h"
#include "tag_duel.h" #include "tag_duel.h"
#include "deck_manager.h"
#include <thread> #include <thread>
namespace ygo { namespace ygo {
......
#ifndef NETSERVER_H #ifndef NETSERVER_H
#define NETSERVER_H #define NETSERVER_H
#include "config.h"
#include "network.h" #include "network.h"
#include "data_manager.h"
#include "deck_manager.h"
#include <set>
#include <unordered_map> #include <unordered_map>
namespace ygo { namespace ygo {
......
#ifndef NETWORK_H #ifndef NETWORK_H
#define NETWORK_H #define NETWORK_H
#include "config.h" #include <cstdint>
#include "deck_manager.h" #include <cstring>
#include <event2/event.h> #include <event2/event.h>
#include <event2/listener.h> #include <event2/listener.h>
#include <event2/bufferevent.h> #include <event2/bufferevent.h>
...@@ -191,7 +191,7 @@ struct DuelPlayer { ...@@ -191,7 +191,7 @@ struct DuelPlayer {
inline bool check_msg_size(int size) { inline bool check_msg_size(int size) {
// empty string is not allowed // empty string is not allowed
if (size < 2* sizeof(uint16_t)) if (size < 2 * sizeof(uint16_t))
return false; return false;
if (size > LEN_CHAT_MSG * sizeof(uint16_t)) if (size > LEN_CHAT_MSG * sizeof(uint16_t))
return false; return false;
......
#include "replay_mode.h" #include "replay_mode.h"
#include "duelclient.h" #include "duelclient.h"
#include "game.h" #include "game.h"
#include "../ocgcore/common.h" #include "data_manager.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
#include <thread> #include <thread>
......
#include "config.h"
#include "single_duel.h" #include "single_duel.h"
#include "netserver.h" #include "netserver.h"
#include "game.h" #include "game.h"
#include "../ocgcore/ocgapi.h" #include "data_manager.h"
#include "../ocgcore/common.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
namespace ygo { namespace ygo {
......
#ifndef SINGLE_DUEL_H #ifndef SINGLE_DUEL_H
#define SINGLE_DUEL_H #define SINGLE_DUEL_H
#include "config.h"
#include "network.h" #include "network.h"
#include "deck_manager.h"
#include "replay.h" #include "replay.h"
namespace ygo { namespace ygo {
......
#include "single_mode.h" #include "single_mode.h"
#include "duelclient.h" #include "duelclient.h"
#include "game.h" #include "game.h"
#include "../ocgcore/common.h" #include "data_manager.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
#include <thread> #include <thread>
......
#include "config.h"
#include "tag_duel.h" #include "tag_duel.h"
#include "netserver.h" #include "netserver.h"
#include "game.h" #include "game.h"
#include "../ocgcore/ocgapi.h" #include "data_manager.h"
#include "../ocgcore/common.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
namespace ygo { namespace ygo {
......
#ifndef TAG_DUEL_H #ifndef TAG_DUEL_H
#define TAG_DUEL_H #define TAG_DUEL_H
#include "config.h"
#include "network.h" #include "network.h"
#include "deck_manager.h"
#include "replay.h" #include "replay.h"
namespace ygo { namespace ygo {
......
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