Skip to content

Commit 789b9c0

Browse files
KnorpelSenflevlam
authored andcommitted
Fix much typos
1 parent 3f4c79d commit 789b9c0

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

CMake/TdSetUpCompiler.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function(td_set_up_compiler)
134134
endif()
135135

136136
if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
137-
add_cxx_compiler_flag("-Wno-maybe-uninitialized") # too much false positives
137+
add_cxx_compiler_flag("-Wno-maybe-uninitialized") # too many false positives
138138
endif()
139139
if (WIN32 AND GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0))
140140
# warns about casts of function pointers returned by GetProcAddress

td/generate/scheme/td_api.tl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2835,7 +2835,7 @@ checkChatUsernameResultUsernameInvalid = CheckChatUsernameResult;
28352835
//@description The username is occupied
28362836
checkChatUsernameResultUsernameOccupied = CheckChatUsernameResult;
28372837

2838-
//@description The user has too much chats with username, one of them must be made private first
2838+
//@description The user has too many chats with username, one of them must be made private first
28392839
checkChatUsernameResultPublicChatsTooMuch = CheckChatUsernameResult;
28402840

28412841
//@description The user can't be a member of a public supergroup

td/mtproto/SessionConnection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ void SessionConnection::flush_packet() {
935935
v.clear();
936936
return result;
937937
}
938-
LOG(WARNING) << "Too much message identifiers in container " << name << ": " << v.size() << " instead of " << size;
938+
LOG(WARNING) << "Too many message identifiers in container " << name << ": " << v.size() << " instead of " << size;
939939
vector<int64> result(v.end() - size, v.end());
940940
v.resize(v.size() - size);
941941
return result;

td/telegram/MessagesManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24527,7 +24527,7 @@ Result<vector<MessageId>> MessagesManager::send_message_group(
2452724527
tl_object_ptr<td_api::messageSendOptions> &&options,
2452824528
vector<tl_object_ptr<td_api::InputMessageContent>> &&input_message_contents) {
2452924529
if (input_message_contents.size() > MAX_GROUPED_MESSAGES) {
24530-
return Status::Error(400, "Too much messages to send as an album");
24530+
return Status::Error(400, "Too many messages to send as an album");
2453124531
}
2453224532
if (input_message_contents.empty()) {
2453324533
return Status::Error(400, "There are no messages to send");
@@ -27039,7 +27039,7 @@ Result<MessagesManager::ForwardedMessages> MessagesManager::get_forwarded_messag
2703927039
vector<MessageCopyOptions> &&copy_options) {
2704027040
CHECK(copy_options.size() == message_ids.size());
2704127041
if (message_ids.size() > 100) { // TODO replace with const from config or implement mass-forward
27042-
return Status::Error(400, "Too much messages to forward");
27042+
return Status::Error(400, "Too many messages to forward");
2704327043
}
2704427044
if (message_ids.empty()) {
2704527045
return Status::Error(400, "There are no messages to forward");

td/telegram/NotificationManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3255,7 +3255,7 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
32553255
loc_args.clear();
32563256
}
32573257
if (loc_args.size() > 1) {
3258-
return Status::Error("Receive too much arguments");
3258+
return Status::Error("Receive too many arguments");
32593259
}
32603260

32613261
if (loc_args.size() == 1) {

td/telegram/PollManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
15421542
}
15431543
auto max_voter_count = std::numeric_limits<int32>::max() / narrow_cast<int32>(poll->options.size()) - 2;
15441544
if (poll_result->voters_ > max_voter_count) {
1545-
LOG(ERROR) << "Have too much " << poll_result->voters_ << " poll voters for an option in " << poll_id;
1545+
LOG(ERROR) << "Have too many " << poll_result->voters_ << " poll voters for an option in " << poll_id;
15461546
poll_result->voters_ = max_voter_count;
15471547
}
15481548
if (poll_result->voters_ != option.voter_count) {

td/telegram/net/Session.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ Status Session::on_message_result_ok(uint64 id, BufferSlice packet, size_t origi
753753
auto dropped_size = dropped_size_;
754754
dropped_size_ = 0;
755755
return Status::Error(
756-
2, PSLICE() << "Too much dropped packets " << tag("total_size", format::as_size(dropped_size)));
756+
2, PSLICE() << "Too many dropped packets " << tag("total_size", format::as_size(dropped_size)));
757757
}
758758
}
759759
return Status::OK();
@@ -1158,8 +1158,8 @@ void Session::connection_open_finish(ConnectionInfo *info,
11581158
info->created_at_ = Time::now_cached();
11591159
info->wakeup_at_ = Time::now_cached() + 10;
11601160
if (unknown_queries_.size() > MAX_INFLIGHT_QUERIES) {
1161-
LOG(ERROR) << "With current limits `Too much queries with unknown state` error must be impossible";
1162-
on_session_failed(Status::Error("Too much queries with unknown state"));
1161+
LOG(ERROR) << "With current limits `Too many queries with unknown state` error must be impossible";
1162+
on_session_failed(Status::Error("Too many queries with unknown state"));
11631163
return;
11641164
}
11651165
if (info->ask_info_) {

tdnet/td/net/HttpHeaderCreator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class HttpHeaderCreator {
5757
sb_ << content;
5858
}
5959
if (sb_.is_error()) {
60-
return Status::Error("Too much headers");
60+
return Status::Error("Too many headers");
6161
}
6262
return sb_.as_cslice();
6363
}

tdnet/td/net/HttpReader.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Result<size_t> HttpReader::read_next(HttpQuery *query, bool can_be_slow) {
200200
case State::ReadArgs: {
201201
auto size = content_->size();
202202
if (size > MAX_TOTAL_PARAMETERS_LENGTH - total_parameters_length_) {
203-
return Status::Error(413, "Request Entity Too Large: too much parameters");
203+
return Status::Error(413, "Request Entity Too Large: too many parameters");
204204
}
205205

206206
if (flow_sink_.is_ready()) {
@@ -406,7 +406,7 @@ Result<bool> HttpReader::parse_multipart_form_data(bool can_be_slow) {
406406
if (has_file_name_) {
407407
// file
408408
if (query_->files_.size() == max_files_) {
409-
return Status::Error(413, "Request Entity Too Large: too much files attached");
409+
return Status::Error(413, "Request Entity Too Large: too many files attached");
410410
}
411411
auto file = open_temp_file(file_name_);
412412
if (file.is_error()) {
@@ -432,7 +432,7 @@ Result<bool> HttpReader::parse_multipart_form_data(bool can_be_slow) {
432432
case FormDataParseState::ReadPartValue:
433433
if (find_boundary(content_->clone(), boundary_, form_data_read_length_)) {
434434
if (total_parameters_length_ + form_data_read_length_ > MAX_TOTAL_PARAMETERS_LENGTH) {
435-
return Status::Error(413, "Request Entity Too Large: too much parameters in form data");
435+
return Status::Error(413, "Request Entity Too Large: too many parameters in form data");
436436
}
437437

438438
query_->container_.emplace_back(content_->cut_head(form_data_read_length_).move_as_buffer_slice());
@@ -460,7 +460,7 @@ Result<bool> HttpReader::parse_multipart_form_data(bool can_be_slow) {
460460
CHECK(content_->size() < form_data_read_length_ + boundary_.size());
461461

462462
if (total_parameters_length_ + form_data_read_length_ > MAX_TOTAL_PARAMETERS_LENGTH) {
463-
return Status::Error(413, "Request Entity Too Large: too much parameters in form data");
463+
return Status::Error(413, "Request Entity Too Large: too many parameters in form data");
464464
}
465465
return false;
466466
case FormDataParseState::ReadFile: {
@@ -594,7 +594,7 @@ Status HttpReader::parse_url(MutableSlice url) {
594594
Status HttpReader::parse_parameters(MutableSlice parameters) {
595595
total_parameters_length_ += parameters.size();
596596
if (total_parameters_length_ > MAX_TOTAL_PARAMETERS_LENGTH) {
597-
return Status::Error(413, "Request Entity Too Large: too much parameters");
597+
return Status::Error(413, "Request Entity Too Large: too many parameters");
598598
}
599599
LOG(DEBUG) << "Parse parameters: \"" << parameters << "\"";
600600

@@ -620,7 +620,7 @@ Status HttpReader::parse_json_parameters(MutableSlice parameters) {
620620

621621
total_parameters_length_ += parameters.size();
622622
if (total_parameters_length_ > MAX_TOTAL_PARAMETERS_LENGTH) {
623-
return Status::Error(413, "Request Entity Too Large: too much parameters");
623+
return Status::Error(413, "Request Entity Too Large: too many parameters");
624624
}
625625
LOG(DEBUG) << "Parse JSON parameters: \"" << parameters << "\"";
626626

tdutils/td/utils/OptionParser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Result<vector<char *>> OptionParser::run_impl(int argc, char *argv[], int expect
196196
return Status::Error("Unexpected non-option parameters specified");
197197
}
198198
if (non_options.size() > static_cast<size_t>(expected_non_option_count)) {
199-
return Status::Error("Too much non-option parameters specified");
199+
return Status::Error("Too many non-option parameters specified");
200200
} else {
201201
return Status::Error("Too few non-option parameters specified");
202202
}

0 commit comments

Comments
 (0)