diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c17b91c2..3ec8c4566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,6 +228,11 @@ endif() if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)) add_cxx_compiler_flag("-Wno-maybe-uninitialized") # too much false positives endif() +if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)) + # warns about a lot of "return std::move", which are not redundant for compilers without fix for DR 1579, i.e. GCC 4.9 or clang 3.8 + # see http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 + add_cxx_compiler_flag("-Wno-redundant-move") +endif() #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/include/c++/v1") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 022254dc5..5001693a2 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -7582,7 +7582,7 @@ void ContactsManager::on_get_channel_participants_success( total_count = static_cast(result.size()); } - const auto max_participant_count = get_channel_type(channel_id) == ChannelType::Megagroup ? 9950 : 195; + const auto max_participant_count = get_channel_type(channel_id) == ChannelType::Megagroup ? 9750 : 195; auto participant_count = filter.is_recent() && total_count != 0 && total_count < max_participant_count ? total_count : -1; int32 administrator_count = filter.is_administrators() ? total_count : -1; diff --git a/tdactor/td/actor/impl/Scheduler.h b/tdactor/td/actor/impl/Scheduler.h index fcb613c39..7adf451eb 100644 --- a/tdactor/td/actor/impl/Scheduler.h +++ b/tdactor/td/actor/impl/Scheduler.h @@ -237,7 +237,7 @@ void Scheduler::send_lambda(ActorRef actor_ref, EventT &&lambda) { [&]() { auto event = Event::lambda(std::forward(lambda)); event.set_link_token(actor_ref.token()); - return std::move(event); + return event; }); } @@ -251,7 +251,7 @@ void Scheduler::send_closure(ActorRef actor_ref, EventT &&closure) { [&]() { auto event = Event::immediate_closure(std::forward(closure)); event.set_link_token(actor_ref.token()); - return std::move(event); + return event; }); }