Various fixes.
GitOrigin-RevId: 3880e2fc5b8704f163817699ec1043f2f7a39b83
This commit is contained in:
parent
9a4617fee3
commit
c10ac96cc9
@ -134,7 +134,7 @@
|
||||
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
|
||||
</SDKReference>
|
||||
<SDKReference Include="TDLib.UWP, Version=1.0">
|
||||
<Name>TDLib for Universal Windows Platfrom</Name>
|
||||
<Name>TDLib for Universal Windows Platform</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
|
@ -105,7 +105,7 @@ function export {
|
||||
|
||||
cd vsix
|
||||
|
||||
if ($compress -eq "zip") {
|
||||
if ($compress -eq "zip") {
|
||||
zip -r tdlib.vsix *
|
||||
} elseif ($compress -eq "winrar") {
|
||||
WinRAR.exe a -afzip -r -ep1 tdlib.vsix *
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "td/utils/port/signals.h"
|
||||
#include "td/utils/port/Stat.h"
|
||||
#include "td/utils/port/thread_local.h"
|
||||
#include "td/utils/Random.h"
|
||||
#include "td/utils/ScopeGuard.h"
|
||||
#include "td/utils/Slice.h"
|
||||
#include "td/utils/Status.h"
|
||||
|
@ -248,7 +248,7 @@ NetQueryDispatcher::NetQueryDispatcher(std::function<ActorShared<>()> create_ref
|
||||
common_public_rsa_key_ = std::make_shared<PublicRsaKeyShared>(DcId::empty());
|
||||
public_rsa_key_watchdog_ = create_actor<PublicRsaKeyWatchdog>("PublicRsaKeyWatchdog", create_reference());
|
||||
|
||||
td_guard_ = create_shared_lamda_guard([actor = create_reference] {});
|
||||
td_guard_ = create_shared_lambda_guard([actor = create_reference] {});
|
||||
}
|
||||
|
||||
NetQueryDispatcher::NetQueryDispatcher() = default;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "td/actor/actor.h"
|
||||
|
||||
#include "td/utils/common.h"
|
||||
#include "td/utils/ScopeGuard.h"
|
||||
#include "td/utils/Status.h"
|
||||
|
||||
#include <array>
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
#include "td/utils/common.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace td {
|
||||
class Guard {
|
||||
@ -23,7 +23,7 @@ class Guard {
|
||||
Guard &operator=(Guard &&other) = default;
|
||||
virtual ~Guard() = default;
|
||||
virtual void dismiss() {
|
||||
abort();
|
||||
std::abort();
|
||||
}
|
||||
};
|
||||
|
||||
@ -57,11 +57,11 @@ class LambdaGuard : public Guard {
|
||||
};
|
||||
|
||||
template <class F>
|
||||
std::unique_ptr<Guard> create_lamda_guard(F &&f) {
|
||||
std::unique_ptr<Guard> create_lambda_guard(F &&f) {
|
||||
return std::make_unique<LambdaGuard<F>>(std::forward<F>(f));
|
||||
}
|
||||
template <class F>
|
||||
std::shared_ptr<Guard> create_shared_lamda_guard(F &&f) {
|
||||
std::shared_ptr<Guard> create_shared_lambda_guard(F &&f) {
|
||||
return std::make_shared<LambdaGuard<F>>(std::forward<F>(f));
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ void do_init_thread_local(P &raw_ptr, ArgsT &&... args) {
|
||||
auto ptr = std::make_unique<T>(std::forward<ArgsT>(args)...);
|
||||
raw_ptr = ptr.get();
|
||||
|
||||
detail::add_thread_local_destructor(create_lamda_guard([ptr = std::move(ptr), &raw_ptr]() mutable {
|
||||
detail::add_thread_local_destructor(create_lambda_guard([ptr = std::move(ptr), &raw_ptr]() mutable {
|
||||
ptr.reset();
|
||||
raw_ptr = nullptr;
|
||||
}));
|
||||
|
Reference in New Issue
Block a user