Fix some misprints.
This commit is contained in:
parent
638767d919
commit
ff6615e734
@ -158,7 +158,7 @@ function split_file($file, $chunks, $undo) {
|
||||
}
|
||||
|
||||
if (count($functions) < $chunks) {
|
||||
fwrite(STDERR, "ERROR: file is too small to be splitted more".PHP_EOL);
|
||||
fwrite(STDERR, "ERROR: file is too small to be split more".PHP_EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1974,7 +1974,7 @@ class ImportChatInviteQuery final : public Td::ResultHandler {
|
||||
auto dialog_ids = UpdatesManager::get_chat_dialog_ids(ptr.get());
|
||||
if (dialog_ids.size() != 1u) {
|
||||
LOG(ERROR) << "Receive wrong result for ImportChatInviteQuery: " << to_string(ptr);
|
||||
return on_error(Status::Error(500, "Internal Server Error: failed to join chat by invite link"));
|
||||
return on_error(Status::Error(500, "Internal Server Error: failed to join chat via invite link"));
|
||||
}
|
||||
auto dialog_id = dialog_ids[0];
|
||||
|
||||
|
@ -1504,7 +1504,7 @@ static bool are_entities_valid(const vector<MessageEntity> &entities) {
|
||||
return false;
|
||||
}
|
||||
if ((nested_entity_type_mask & get_splittable_entities_mask()) != 0) {
|
||||
// the previous nested entity may be needed to splitted for consistency
|
||||
// the previous nested entity may be needed to split for consistency
|
||||
// alternatively, better entity merging needs to be implemented
|
||||
return false;
|
||||
}
|
||||
@ -2595,7 +2595,7 @@ static FormattedText parse_pre_entities_v3(Slice text, vector<MessageEntity> ent
|
||||
}
|
||||
|
||||
// text entities must be valid
|
||||
// returned entities must be resplitted and fixed
|
||||
// returned entities must be resplit and fixed
|
||||
FormattedText parse_markdown_v3(FormattedText text) {
|
||||
if (text.text.find('`') != string::npos) {
|
||||
text = parse_pre_entities_v3(text.text, std::move(text.entities));
|
||||
|
@ -140,7 +140,7 @@ class SecretChatActor final : public NetQueryCallback {
|
||||
static constexpr int32 MAX_RESEND_COUNT = 1000;
|
||||
|
||||
// We have git state that should be synchronized with the database.
|
||||
// It is splitted into several parts because:
|
||||
// It is split into several parts because:
|
||||
// 1. Some parts are BIG (auth_key, for example) and are rarely updated.
|
||||
// 2. Other are frequently updated, so probably should be as small as possible.
|
||||
// 3. Some parts must be updated atomically.
|
||||
|
@ -1801,7 +1801,7 @@ class JoinChatByInviteLinkRequest final : public RequestActor<DialogId> {
|
||||
|
||||
void do_send_result() final {
|
||||
CHECK(dialog_id_.is_valid());
|
||||
td_->messages_manager_->force_create_dialog(dialog_id_, "join chat by invite link");
|
||||
td_->messages_manager_->force_create_dialog(dialog_id_, "join chat via an invite link");
|
||||
send_result(td_->messages_manager_->get_chat_object(dialog_id_));
|
||||
}
|
||||
|
||||
|
@ -29,25 +29,25 @@ TEST(Buffer, buffer_builder) {
|
||||
}
|
||||
{
|
||||
auto str = td::rand_string('a', 'z', 10000);
|
||||
auto splitted_str = td::rand_split(str);
|
||||
auto split_str = td::rand_split(str);
|
||||
|
||||
int l = td::Random::fast(0, static_cast<int>(splitted_str.size() - 1));
|
||||
int l = td::Random::fast(0, static_cast<int>(split_str.size() - 1));
|
||||
int r = l;
|
||||
td::BufferBuilder builder(splitted_str[l], 123, 1000);
|
||||
while (l != 0 || r != static_cast<int>(splitted_str.size()) - 1) {
|
||||
if (l == 0 || (td::Random::fast_bool() && r != static_cast<int>(splitted_str.size() - 1))) {
|
||||
td::BufferBuilder builder(split_str[l], 123, 1000);
|
||||
while (l != 0 || r != static_cast<int>(split_str.size()) - 1) {
|
||||
if (l == 0 || (td::Random::fast_bool() && r != static_cast<int>(split_str.size() - 1))) {
|
||||
r++;
|
||||
if (td::Random::fast_bool()) {
|
||||
builder.append(splitted_str[r]);
|
||||
builder.append(split_str[r]);
|
||||
} else {
|
||||
builder.append(td::BufferSlice(splitted_str[r]));
|
||||
builder.append(td::BufferSlice(split_str[r]));
|
||||
}
|
||||
} else {
|
||||
l--;
|
||||
if (td::Random::fast_bool()) {
|
||||
builder.prepend(splitted_str[l]);
|
||||
builder.prepend(split_str[l]);
|
||||
} else {
|
||||
builder.prepend(td::BufferSlice(splitted_str[l]));
|
||||
builder.prepend(td::BufferSlice(split_str[l]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user