mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Move some modules to lib_mtproto.
This commit is contained in:
@@ -58,12 +58,6 @@ static_assert(sizeof(MTPdouble) == 8, "Basic types size check failed");
|
||||
|
||||
static_assert(sizeof(int) >= 4, "Basic types size check failed");
|
||||
|
||||
namespace {
|
||||
|
||||
std::atomic<int> GlobalAtomicRequestId = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
// Precise timing functions / rand init
|
||||
|
||||
struct CRYPTO_dynlock_value {
|
||||
@@ -206,14 +200,6 @@ namespace ThirdParty {
|
||||
}
|
||||
}
|
||||
|
||||
int GetNextRequestId() {
|
||||
const auto result = ++GlobalAtomicRequestId;
|
||||
if (result == std::numeric_limits<int>::max() / 2) {
|
||||
GlobalAtomicRequestId = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int32 *hashSha1(const void *data, uint32 len, void *dest) {
|
||||
return (int32*)SHA1((const uchar*)data, (size_t)len, (uchar*)dest);
|
||||
}
|
||||
|
Reference in New Issue
Block a user