diff --git a/README.md b/README.md index 5f17add74..a108f2e33 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ the [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_ap all available `TDLib` [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html). `TDLib` JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying `TDLib` API can be different for different minor and even patch versions. -If you need to support different `TDLib` versions then you can use a value of the `version` option to find exact `TDLib` version and to use appropriate API then. +If you need to support different `TDLib` versions, then you can use a value of the `version` option to find exact `TDLib` version to use appropriate API methods. See [example/python/tdjson_example.py](https://github.com/tdlib/td/tree/master/example/python/tdjson_example.py) for an example of such usage. diff --git a/benchmark/bench_misc.cpp b/benchmark/bench_misc.cpp index 2cc3c9ba5..2c5113dab 100644 --- a/benchmark/bench_misc.cpp +++ b/benchmark/bench_misc.cpp @@ -78,7 +78,7 @@ BENCH(NewInt, "new int + delete") { do_not_optimize_away(res); } -BENCH(NewObj, "new struct then delete") { +BENCH(NewObj, "new struct, then delete") { struct A { int32 a = 0; int32 b = 0; @@ -99,7 +99,7 @@ BENCH(NewObj, "new struct then delete") { } #if !TD_THREAD_UNSUPPORTED -BENCH(ThreadNew, "new struct then delete in several threads") { +BENCH(ThreadNew, "new struct, then delete in several threads") { td::NewObjBench a, b; thread ta([&] { a.run(n / 2); }); thread tb([&] { b.run(n - n / 2); }); diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 51497d2d7..eab5be8a2 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -959,7 +959,7 @@ class MessagesManager : public Actor { MessageId first_database_message_id; // identifier of the first message in the database, needed // until there is no gaps in the database MessageId last_database_message_id; // identifier of the last local or server message, if last_database_message_id - // is known and last_message_id is known then last_database_message_id <= + // is known and last_message_id is known, then last_database_message_id <= // last_message_id std::array first_database_message_id_by_index; diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 25ce0870c..19688b31a 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -814,7 +814,7 @@ int32 NotificationManager::get_notification_delay_ms(DialogId dialog_id, const P auto delay_ms = [&]() { auto online_info = td_->contacts_manager_->get_my_online_status(); if (!online_info.is_online_local && online_info.is_online_remote) { - // If we are offline, but online from some other client then delay notification + // If we are offline, but online from some other client, then delay notification // for 'notification_cloud_delay' seconds. return notification_cloud_delay_ms_; } diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 990e6b3e6..4767b7ed5 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -3095,7 +3095,7 @@ void StickersManager::on_get_archived_sticker_sets( LOG(ERROR) << "Receive " << total_count << " as total count of archived sticker sets"; } - // if 0 sticker sets are received then set offset_sticker_set_id was found and there is no stickers after it + // if 0 sticker sets are received, then set offset_sticker_set_id was found and there is no stickers after it // or it wasn't found and there is no archived sets at all bool is_last = sticker_sets.empty() && diff --git a/tdutils/td/utils/ObjectPool.h b/tdutils/td/utils/ObjectPool.h index 05b223621..97ed0fce7 100644 --- a/tdutils/td/utils/ObjectPool.h +++ b/tdutils/td/utils/ObjectPool.h @@ -45,7 +45,7 @@ class ObjectPool { // It is not very usual case of acquire/release use. // Instead of publishing an object via some flag we do the opposite. // We publish new generation via destruction of the data. - // In usual case if we see a flag then we are able to use an object. + // In usual case if we see a flag, then we are able to use an object. // In our case if we have used an object and it is already invalid, then generation will mismatch bool is_alive() const { if (!storage_) { diff --git a/tdutils/test/filesystem.cpp b/tdutils/test/filesystem.cpp index b84e9054f..a482d186f 100644 --- a/tdutils/test/filesystem.cpp +++ b/tdutils/test/filesystem.cpp @@ -36,7 +36,7 @@ TEST(Misc, clean_filename) { ASSERT_STREQ(clean_filename("....test"), "test"); ASSERT_STREQ(clean_filename("test.exe...."), "test.exe"); // extension has changed ASSERT_STREQ(clean_filename("test.exe01234567890123456789...."), - "test.exe01234567890123456789"); // extension may be more then 20 characters + "test.exe01234567890123456789"); // extension may be more than 20 characters ASSERT_STREQ(clean_filename("....test....asdf"), "test.asdf"); ASSERT_STREQ(clean_filename("കറുപ്പ്.txt"), "കറപപ.txt"); }