Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_71398851
ComWeChatRobot
提交
482f6e77
C
ComWeChatRobot
项目概览
m0_71398851
/
ComWeChatRobot
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ComWeChatRobot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
482f6e77
编写于
8月 18, 2022
作者:
A
amchii
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pre-commit忽略生成的_i.h,_p.c文件
上级
98fcc768
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
3746 addition
and
3659 deletion
+3746
-3659
.pre-commit-config.yaml
.pre-commit-config.yaml
+10
-6
CWeChatRobot/WeChatRobotCOM_i.h
CWeChatRobot/WeChatRobotCOM_i.h
+594
-564
CWeChatRobot/WeChatRobotCOM_p.c
CWeChatRobot/WeChatRobotCOM_p.c
+3134
-3082
CWeChatRobot/_IRobotEventEvents_CP.h
CWeChatRobot/_IRobotEventEvents_CP.h
+1
-1
CWeChatRobot/utils.h
CWeChatRobot/utils.h
+7
-6
Release/CWeChatRobot.exe
Release/CWeChatRobot.exe
+0
-0
未找到文件。
.pre-commit-config.yaml
浏览文件 @
482f6e77
...
...
@@ -14,11 +14,15 @@ repos:
-
-i
-
--style=file
-
--fallback-style=none
files
:
|
(?x)^(
.*?\.cpp|
.*?\.c|
.*?\.h
)
files
:
|
exclude
:
|
(?x)^(
.*?\.cpp|
.*?\.c|
.*?\.h
)
\ No newline at end of file
.*?_i\.h|
.*?_p\.c
)
CWeChatRobot/WeChatRobotCOM_i.h
浏览文件 @
482f6e77
此差异已折叠。
点击以展开。
CWeChatRobot/WeChatRobotCOM_p.c
浏览文件 @
482f6e77
此差异已折叠。
点击以展开。
CWeChatRobot/_IRobotEventEvents_CP.h
浏览文件 @
482f6e77
...
...
@@ -21,7 +21,7 @@ public:
{
return
hr
;
}
T
*
pThis
=
stat
ic_cast
<
T
*>
(
this
);
T
*
pThis
=
dynam
ic_cast
<
T
*>
(
this
);
if
(
WxPidToEventCookie
.
count
(
pid
)
==
0
)
{
return
hr
;
...
...
CWeChatRobot/utils.h
浏览文件 @
482f6e77
#pragma once
#include <set>
#include <utility>
#include <chrono>
#define CHRONO std::chrono
...
...
@@ -21,6 +20,7 @@ public:
ExpireSet
(
ull
interval
)
{
this
->
interval
=
interval
;
this
->
expires_at
=
0
;
}
bool
CheckIfDuplicatedAndAdd
(
ull
id
)
{
...
...
@@ -35,18 +35,19 @@ public:
private:
std
::
set
<
ull
>
ids
;
std
::
pair
<
ull
,
ull
>
p
;
ull
expires_at
;
void
Add
(
ull
id
)
{
// 毫秒
auto
now
=
CHRONO
::
time_point_cast
<
CHRONO
::
milliseconds
>
(
CHRONO
::
system_clock
::
now
());
if
(
p
.
second
<
now
.
time_since_epoch
().
count
())
auto
now_ts
=
CHRONO
::
time_point_cast
<
CHRONO
::
milliseconds
>
(
CHRONO
::
system_clock
::
now
()).
time_since_epoch
().
count
();
#pragma warning(disable : 4018)
if
(
expires_at
<
now_ts
)
{
ids
.
clear
();
p
.
first
=
now
.
time_since_epoch
().
count
();
p
.
second
=
p
.
first
+
interval
;
expires_at
=
now_ts
+
interval
;
}
#pragma warning(default : 4018)
ids
.
insert
(
id
);
}
};
Release/CWeChatRobot.exe
浏览文件 @
482f6e77
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录