Refactoring

This commit is contained in:
Changhua 2023-02-28 20:41:52 +08:00
parent 50e53d36fa
commit fa81ea3e24

View File

@ -19,6 +19,11 @@ typedef struct MemberList {
int AddChatroomMember(string roomid, string wxids)
{
if (roomid.empty() || wxids.empty()) {
LOG_ERROR("Empty roomid or wxids.");
return -1;
}
int rv = 0;
DWORD addRoomMemberCall1 = g_WeChatWinDllAddr + g_WxCalls.arm.call1;
DWORD addRoomMemberCall2 = g_WeChatWinDllAddr + g_WxCalls.arm.call2;
@ -32,7 +37,6 @@ int AddChatroomMember(string roomid, string wxids)
vector<wstring> vMembers;
vector<TextStruct_t> vTxtMembers;
if (!wxids.empty()) {
wstringstream wss(String2Wstring(wxids));
while (wss.good()) {
wstring wstr;
@ -44,7 +48,6 @@ int AddChatroomMember(string roomid, string wxids)
txtMember.capacity = vMembers.back().capacity();
vTxtMembers.push_back(txtMember);
}
}
LOG_DEBUG("Adding {} members[{}] to {}", vTxtMembers.size(), wxids.c_str(), roomid.c_str());
__asm {