Improve some spelling.
This commit is contained in:
parent
3e5f30af70
commit
ad8f0c4146
@ -1433,7 +1433,7 @@ replyMarkupInlineKeyboard rows:vector<vector<inlineKeyboardButton>> = ReplyMarku
|
|||||||
|
|
||||||
//@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
|
//@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
|
||||||
|
|
||||||
//@description An HTTP url needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm
|
//@description An HTTP URL needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm
|
||||||
loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
||||||
|
|
||||||
//@description An authorization confirmation dialog needs to be shown to the user
|
//@description An authorization confirmation dialog needs to be shown to the user
|
||||||
@ -2978,7 +2978,7 @@ groupCallStream channel_id:int32 scale:int32 time_offset:int53 = GroupCallStream
|
|||||||
//@description Represents a list of group call streams @streams A list of group call streams
|
//@description Represents a list of group call streams @streams A list of group call streams
|
||||||
groupCallStreams streams:vector<groupCallStream> = GroupCallStreams;
|
groupCallStreams streams:vector<groupCallStream> = GroupCallStreams;
|
||||||
|
|
||||||
//@description Represents an RTMP url @url The URL @stream_key Stream key
|
//@description Represents an RTMP URL @url The URL @stream_key Stream key
|
||||||
rtmpUrl url:string stream_key:string = RtmpUrl;
|
rtmpUrl url:string stream_key:string = RtmpUrl;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1019,7 +1019,6 @@ class TlWriterCCommon final : public tl::TL_writer {
|
|||||||
if (is_proxy || is_header_ != 1) {
|
if (is_proxy || is_header_ != 1) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// return "#define CODE_" + class_name + " " + int_to_string(id) + "\n";
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class BackgroundManager final : public Actor {
|
|||||||
FlatHashMap<BackgroundId, unique_ptr<Background>, BackgroundIdHash> backgrounds_;
|
FlatHashMap<BackgroundId, unique_ptr<Background>, BackgroundIdHash> backgrounds_;
|
||||||
|
|
||||||
FlatHashMap<BackgroundId, std::pair<int64, FileSourceId>, BackgroundIdHash>
|
FlatHashMap<BackgroundId, std::pair<int64, FileSourceId>, BackgroundIdHash>
|
||||||
background_id_to_file_source_id_; // id -> [access_hash, file_source_id]
|
background_id_to_file_source_id_; // background_id -> [access_hash, file_source_id]
|
||||||
|
|
||||||
FlatHashMap<string, BackgroundId> name_to_background_id_;
|
FlatHashMap<string, BackgroundId> name_to_background_id_;
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ class ClientManager final {
|
|||||||
* if (response.id == 0) {
|
* if (response.id == 0) {
|
||||||
* // process response.object as an incoming update of type td_api::Update
|
* // process response.object as an incoming update of type td_api::Update
|
||||||
* } else {
|
* } else {
|
||||||
* // process response.object as an answer to a sent request with id response.id
|
* // process response.object as an answer to a sent request with identifier response.id
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* \endcode
|
* \endcode
|
||||||
|
@ -725,7 +725,7 @@ class ContactsManager final : public Actor {
|
|||||||
|
|
||||||
FlatHashSet<int64> photo_ids;
|
FlatHashSet<int64> photo_ids;
|
||||||
|
|
||||||
FlatHashMap<DialogId, int32, DialogIdHash> online_member_dialogs; // id -> time
|
FlatHashMap<DialogId, int32, DialogIdHash> online_member_dialogs; // dialog_id -> time
|
||||||
|
|
||||||
static constexpr uint32 CACHE_VERSION = 4;
|
static constexpr uint32 CACHE_VERSION = 4;
|
||||||
uint32 cache_version = 0;
|
uint32 cache_version = 0;
|
||||||
|
@ -565,7 +565,7 @@ class MessageDbImpl final : public MessageDbSyncInterface {
|
|||||||
prev_found_message_id = message_id;
|
prev_found_message_id = message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// left_message_id is always an id of suitable message, let's return it
|
// left_message_id is always an identifier of suitable message, let's return it
|
||||||
return get_message({dialog_id, MessageId(left_message_id)});
|
return get_message({dialog_id, MessageId(left_message_id)});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25826,7 +25826,7 @@ MessageId MessagesManager::get_persistent_message_id(const Dialog *d, MessageId
|
|||||||
return MessageId();
|
return MessageId();
|
||||||
}
|
}
|
||||||
if (message_id.is_yet_unsent()) {
|
if (message_id.is_yet_unsent()) {
|
||||||
// it is possible that user tries to do something with an already sent message by its temporary id
|
// it is possible that user tries to do something with an already sent message by its temporary identifier
|
||||||
// we need to use real message in this case and transparently replace message_id
|
// we need to use real message in this case and transparently replace message_id
|
||||||
auto it = d->yet_unsent_message_id_to_persistent_message_id.find(message_id);
|
auto it = d->yet_unsent_message_id_to_persistent_message_id.find(message_id);
|
||||||
if (it != d->yet_unsent_message_id_to_persistent_message_id.end()) {
|
if (it != d->yet_unsent_message_id_to_persistent_message_id.end()) {
|
||||||
|
@ -1599,7 +1599,7 @@ class MessagesManager final : public Actor {
|
|||||||
protected:
|
protected:
|
||||||
MessagesIteratorBase() = default;
|
MessagesIteratorBase() = default;
|
||||||
|
|
||||||
// points iterator to message with greatest id which is less or equal than message_id
|
// points iterator to message with greatest identifier which is less or equal than message_id
|
||||||
MessagesIteratorBase(const Message *root, MessageId message_id) {
|
MessagesIteratorBase(const Message *root, MessageId message_id) {
|
||||||
size_t last_right_pos = 0;
|
size_t last_right_pos = 0;
|
||||||
while (root != nullptr) {
|
while (root != nullptr) {
|
||||||
|
@ -3174,7 +3174,7 @@ StickerSetId StickersManager::on_get_input_sticker_set(FileId sticker_file_id,
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
// always return empty StickerSetId, because we can't trust the set_id provided by the peer in the secret chat
|
// always return empty StickerSetId, because we can't trust the set_id provided by the peer in the secret chat
|
||||||
// the real sticker set id will be set in on_get_sticker if and only if the sticker is really from the set
|
// the real sticker set identifier will be set in on_get_sticker if and only if the sticker is really from the set
|
||||||
return StickerSetId();
|
return StickerSetId();
|
||||||
}
|
}
|
||||||
case telegram_api::inputStickerSetAnimatedEmoji::ID:
|
case telegram_api::inputStickerSetAnimatedEmoji::ID:
|
||||||
|
@ -968,7 +968,8 @@ class StickersManager final : public Actor {
|
|||||||
bool is_inited_ = false;
|
bool is_inited_ = false;
|
||||||
|
|
||||||
WaitFreeHashMap<FileId, unique_ptr<Sticker>, FileIdHash> stickers_; // file_id -> Sticker
|
WaitFreeHashMap<FileId, unique_ptr<Sticker>, FileIdHash> stickers_; // file_id -> Sticker
|
||||||
WaitFreeHashMap<StickerSetId, unique_ptr<StickerSet>, StickerSetIdHash> sticker_sets_; // id -> StickerSet
|
WaitFreeHashMap<StickerSetId, unique_ptr<StickerSet>, StickerSetIdHash>
|
||||||
|
sticker_sets_; // sticker_set_id -> StickerSet
|
||||||
WaitFreeHashMap<string, StickerSetId> short_name_to_sticker_set_id_;
|
WaitFreeHashMap<string, StickerSetId> short_name_to_sticker_set_id_;
|
||||||
|
|
||||||
vector<StickerSetId> installed_sticker_set_ids_[MAX_STICKER_TYPE];
|
vector<StickerSetId> installed_sticker_set_ids_[MAX_STICKER_TYPE];
|
||||||
|
@ -69,8 +69,8 @@ inline void ActorInfo::clear() {
|
|||||||
CHECK(!actor_);
|
CHECK(!actor_);
|
||||||
CHECK(!is_running());
|
CHECK(!is_running());
|
||||||
CHECK(!is_migrating());
|
CHECK(!is_migrating());
|
||||||
// NB: must be in non migrating state
|
// NB: must be in non-migrating state
|
||||||
// store invalid scheduler id.
|
// store invalid scheduler identifier
|
||||||
sched_id_.store((1 << 30) - 1, std::memory_order_relaxed);
|
sched_id_.store((1 << 30) - 1, std::memory_order_relaxed);
|
||||||
VLOG(actor) << "Clear context " << context_.get() << " for " << get_name();
|
VLOG(actor) << "Clear context " << context_.get() << " for " << get_name();
|
||||||
context_.reset();
|
context_.reset();
|
||||||
|
@ -155,7 +155,7 @@ class Container {
|
|||||||
void release(int32 id) {
|
void release(int32 id) {
|
||||||
inc_generation(id);
|
inc_generation(id);
|
||||||
slots_[id].data = DataT();
|
slots_[id].data = DataT();
|
||||||
if (slots_[id].generation & ~TYPE_MASK) { // generation overflow. Can't use this id anymore
|
if (slots_[id].generation & ~TYPE_MASK) { // generation overflow. Can't use this identifier anymore
|
||||||
empty_slots_.push_back(id);
|
empty_slots_.push_back(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ Logger::Logger(LogInterface &log, const LogOptions &options, int log_level, Slic
|
|||||||
}
|
}
|
||||||
sb_ << ']';
|
sb_ << ']';
|
||||||
|
|
||||||
// thread id
|
// thread identifier
|
||||||
auto thread_id = get_thread_id();
|
auto thread_id = get_thread_id();
|
||||||
sb_ << "[t";
|
sb_ << "[t";
|
||||||
if (static_cast<uint32>(thread_id) < 10) {
|
if (static_cast<uint32>(thread_id) < 10) {
|
||||||
|
@ -600,12 +600,12 @@ class UdpSocketFdImpl {
|
|||||||
|
|
||||||
case EBADF: // impossible
|
case EBADF: // impossible
|
||||||
case ENOTSOCK: // impossible
|
case ENOTSOCK: // impossible
|
||||||
case EPIPE: // impossible for udp
|
case EPIPE: // impossible for UDP
|
||||||
case ECONNRESET: // impossible for udp
|
case ECONNRESET: // impossible for UDP
|
||||||
case EDESTADDRREQ: // we checked that address is valid
|
case EDESTADDRREQ: // we checked that address is valid
|
||||||
case ENOTCONN: // we checked that address is valid
|
case ENOTCONN: // we checked that address is valid
|
||||||
case EINTR: // we already skipped all EINTR
|
case EINTR: // we already skipped all EINTR
|
||||||
case EISCONN: // impossible for udp socket
|
case EISCONN: // impossible for UDP socket
|
||||||
case EOPNOTSUPP:
|
case EOPNOTSUPP:
|
||||||
case ENOTDIR:
|
case ENOTDIR:
|
||||||
case EFAULT:
|
case EFAULT:
|
||||||
|
@ -46,10 +46,12 @@ class CheckedHeap {
|
|||||||
nodes[i].value = i;
|
nodes[i].value = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xx(int key, const td::HeapNode *heap_node) {
|
static void xx(int key, const td::HeapNode *heap_node) {
|
||||||
const Node *node = static_cast<const Node *>(heap_node);
|
const Node *node = static_cast<const Node *>(heap_node);
|
||||||
std::fprintf(stderr, "(%d;%d)", node->key, node->value);
|
std::fprintf(stderr, "(%d;%d)", node->key, node->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void check() const {
|
void check() const {
|
||||||
for (auto p : set_heap) {
|
for (auto p : set_heap) {
|
||||||
std::fprintf(stderr, "(%d;%d)", p.first, p.second);
|
std::fprintf(stderr, "(%d;%d)", p.first, p.second);
|
||||||
@ -59,13 +61,16 @@ class CheckedHeap {
|
|||||||
std::fprintf(stderr, "\n");
|
std::fprintf(stderr, "\n");
|
||||||
kheap.check();
|
kheap.check();
|
||||||
}
|
}
|
||||||
|
|
||||||
int random_id() const {
|
int random_id() const {
|
||||||
CHECK(!empty());
|
CHECK(!empty());
|
||||||
return ids[td::Random::fast(0, static_cast<int>(ids.size() - 1))];
|
return ids[td::Random::fast(0, static_cast<int>(ids.size() - 1))];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t size() const {
|
std::size_t size() const {
|
||||||
return ids.size();
|
return ids.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
return ids.empty();
|
return ids.empty();
|
||||||
}
|
}
|
||||||
@ -77,8 +82,8 @@ class CheckedHeap {
|
|||||||
ASSERT_EQ(res, kheap.top_key());
|
ASSERT_EQ(res, kheap.top_key());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int insert(int key) {
|
int insert(int key) {
|
||||||
// std::fprintf(stderr, "insert %d\n", key);
|
|
||||||
int id;
|
int id;
|
||||||
if (free_ids.empty()) {
|
if (free_ids.empty()) {
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
@ -96,15 +101,15 @@ class CheckedHeap {
|
|||||||
set_heap.emplace(key, id);
|
set_heap.emplace(key, id);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fix_key(int new_key, int id) {
|
void fix_key(int new_key, int id) {
|
||||||
// std::fprintf(stderr, "fix key %d %d (old_key = %d)\n", new_key, id, nodes[id].key);
|
|
||||||
set_heap.erase(std::make_pair(nodes[id].key, id));
|
set_heap.erase(std::make_pair(nodes[id].key, id));
|
||||||
nodes[id].key = new_key;
|
nodes[id].key = new_key;
|
||||||
kheap.fix(new_key, &nodes[id]);
|
kheap.fix(new_key, &nodes[id]);
|
||||||
set_heap.emplace(new_key, id);
|
set_heap.emplace(new_key, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void erase(int id) {
|
void erase(int id) {
|
||||||
// std::fprintf(stderr, "erase %d\n", id);
|
|
||||||
int pos = rev_ids[id];
|
int pos = rev_ids[id];
|
||||||
CHECK(pos != -1);
|
CHECK(pos != -1);
|
||||||
ids[pos] = ids.back();
|
ids[pos] = ids.back();
|
||||||
@ -116,8 +121,8 @@ class CheckedHeap {
|
|||||||
kheap.erase(&nodes[id]);
|
kheap.erase(&nodes[id]);
|
||||||
set_heap.erase(std::make_pair(nodes[id].key, id));
|
set_heap.erase(std::make_pair(nodes[id].key, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pop() {
|
void pop() {
|
||||||
// std::fprintf(stderr, "pop\n");
|
|
||||||
CHECK(!empty());
|
CHECK(!empty());
|
||||||
Node *node = static_cast<Node *>(kheap.pop());
|
Node *node = static_cast<Node *>(kheap.pop());
|
||||||
int id = node->value;
|
int id = node->value;
|
||||||
|
Loading…
Reference in New Issue
Block a user