Commit 8663959e authored by captainwong's avatar captainwong

fix gcc cry

parent fe357ded
...@@ -176,7 +176,10 @@ void handle_com_passthrough(ThreadContext* context, Client& client, evbuffer* ou ...@@ -176,7 +176,10 @@ void handle_com_passthrough(ThreadContext* context, Client& client, evbuffer* ou
com::A2R::ZoneAndProperties zps; bool hasMore = false; com::A2R::ZoneAndProperties zps; bool hasMore = false;
if (client.queryZoneStage == QueryZoneStage::QueryingZones && resp.parse(zps, hasMore)) { if (client.queryZoneStage == QueryZoneStage::QueryingZones && resp.parse(zps, hasMore)) {
for (const auto& zp : zps) { for (const auto& zp : zps) {
client.zones[zp.zone] = ZonePropertyAndLostConfig{ zp.prop, false }; ZonePropertyAndLostConfig zplc;
zplc.prop = zp.prop;
zplc.enableLostReport = false;
client.zones[zp.zone] = zplc;
} }
char buf[1024]; char buf[1024];
......
...@@ -1566,7 +1566,7 @@ enum ZoneType : Char { ...@@ -1566,7 +1566,7 @@ enum ZoneType : Char {
ZT_INVALID = 0xFF, ZT_INVALID = 0xFF,
}; };
static constexpr ZoneType zoneTypeFromChar(Char c) { static ZoneType zoneTypeFromChar(Char c) {
switch (c) { switch (c) {
case ZT_ZONE: return ZT_ZONE; case ZT_ZONE: return ZT_ZONE;
case ZT_SUBMACHINE: return ZT_SUBMACHINE; case ZT_SUBMACHINE: return ZT_SUBMACHINE;
...@@ -1600,7 +1600,7 @@ enum ZoneProperty : Char { ...@@ -1600,7 +1600,7 @@ enum ZoneProperty : Char {
ZP_INVALID = 0xFF, ZP_INVALID = 0xFF,
}; };
static constexpr ZoneProperty zonePropertyFromChar(Char c) { static ZoneProperty zonePropertyFromChar(Char c) {
switch (c) { switch (c) {
case ZP_GLOBAL: return ZP_GLOBAL; case ZP_GLOBAL: return ZP_GLOBAL;
case ZP_HALF: return ZP_HALF; case ZP_HALF: return ZP_HALF;
...@@ -1616,7 +1616,7 @@ static constexpr ZoneProperty zonePropertyFromChar(Char c) { ...@@ -1616,7 +1616,7 @@ static constexpr ZoneProperty zonePropertyFromChar(Char c) {
} }
#ifdef ENABLE_OLD_ZONE_PROPERTY_TO_STRING #ifdef ENABLE_OLD_ZONE_PROPERTY_TO_STRING
static constexpr wchar_t* zonePropertyToString(ZoneProperty zp) { static const wchar_t* zonePropertyToString(ZoneProperty zp) {
switch (zp) { switch (zp) {
case ZP_GLOBAL: return L"全局盗警"; case ZP_GLOBAL: return L"全局盗警";
case ZP_HALF: return L"半局盗警"; case ZP_HALF: return L"半局盗警";
......
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