Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ademco_hb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
ademco_hb
Commits
8663959e
Commit
8663959e
authored
Aug 20, 2020
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gcc cry
parent
fe357ded
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
server_demo_libevent.cpp
examples/server_demo_libevent/server_demo_libevent.cpp
+4
-1
hb_detail.h
include/hb_detail.h
+3
-3
No files found.
examples/server_demo_libevent/server_demo_libevent.cpp
View file @
8663959e
...
...
@@ -176,7 +176,10 @@ void handle_com_passthrough(ThreadContext* context, Client& client, evbuffer* ou
com
::
A2R
::
ZoneAndProperties
zps
;
bool
hasMore
=
false
;
if
(
client
.
queryZoneStage
==
QueryZoneStage
::
QueryingZones
&&
resp
.
parse
(
zps
,
hasMore
))
{
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
];
...
...
include/hb_detail.h
View file @
8663959e
...
...
@@ -1566,7 +1566,7 @@ enum ZoneType : Char {
ZT_INVALID
=
0xFF
,
};
static
constexpr
ZoneType
zoneTypeFromChar
(
Char
c
)
{
static
ZoneType
zoneTypeFromChar
(
Char
c
)
{
switch
(
c
)
{
case
ZT_ZONE
:
return
ZT_ZONE
;
case
ZT_SUBMACHINE
:
return
ZT_SUBMACHINE
;
...
...
@@ -1600,7 +1600,7 @@ enum ZoneProperty : Char {
ZP_INVALID
=
0xFF
,
};
static
constexpr
ZoneProperty
zonePropertyFromChar
(
Char
c
)
{
static
ZoneProperty
zonePropertyFromChar
(
Char
c
)
{
switch
(
c
)
{
case
ZP_GLOBAL
:
return
ZP_GLOBAL
;
case
ZP_HALF
:
return
ZP_HALF
;
...
...
@@ -1616,7 +1616,7 @@ static constexpr ZoneProperty zonePropertyFromChar(Char c) {
}
#ifdef ENABLE_OLD_ZONE_PROPERTY_TO_STRING
static
const
expr
wchar_t
*
zonePropertyToString
(
ZoneProperty
zp
)
{
static
const
wchar_t
*
zonePropertyToString
(
ZoneProperty
zp
)
{
switch
(
zp
)
{
case
ZP_GLOBAL
:
return
L"全局盗警"
;
case
ZP_HALF
:
return
L"半局盗警"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment