mirror of https://github.com/procxx/kepka.git
Alpha version 0.10.3: fixed the build for old OS X versions and Qt 5.3.2
This commit is contained in:
parent
1a4986058d
commit
9bd30ba09f
|
@ -1355,7 +1355,7 @@ RevokePublicLinkBox::RevokePublicLinkBox(base::lambda_unique<void()> &&revokeCal
|
|||
, _revokeWidth(st::normalFont->width(lang(lng_channels_too_much_public_revoke)))
|
||||
, _aboutRevoke(this, lang(lng_channels_too_much_public_about), FlatLabel::InitType::Simple, st::aboutRevokePublicLabel)
|
||||
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
|
||||
, _revokeCallback(std::move(revokeCallback)) {
|
||||
, _revokeCallback(std_::move(revokeCallback)) {
|
||||
setMouseTracking(true);
|
||||
|
||||
MTP::send(MTPchannels_GetAdminedPublicChannels(), rpcDone(&RevokePublicLinkBox::getPublicDone), rpcFail(&RevokePublicLinkBox::getPublicFail));
|
||||
|
|
|
@ -339,6 +339,13 @@ inline constexpr typename remove_reference<T>::type &&move(T &&value) noexcept {
|
|||
return static_cast<typename remove_reference<T>::type&&>(value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void swap(T &a, T &b) {
|
||||
T tmp = move(a);
|
||||
a = move(b);
|
||||
b = move(tmp);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct remove_const {
|
||||
using type = T;
|
||||
|
@ -510,7 +517,7 @@ struct is_base_of {
|
|||
template <typename T>
|
||||
T createAndSwap(T &value) {
|
||||
T result = T();
|
||||
std::swap(result, value);
|
||||
std_::swap(result, value);
|
||||
return std_::move(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ private:
|
|||
}
|
||||
|
||||
static void destroyNode(Subscription::Node *node) {
|
||||
if (auto that = node->observable.lock()) {
|
||||
if (auto that = node->observable.toStrongRef()) {
|
||||
static_cast<CommonObservableData*>(that.data())->remove(node);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,9 +39,9 @@ public:
|
|||
, _plaindata(createAndSwap(other._plaindata)) {
|
||||
}
|
||||
vector_of_moveable &operator=(vector_of_moveable &&other) {
|
||||
std::swap(_size, other._size);
|
||||
std::swap(_capacity, other._capacity);
|
||||
std::swap(_plaindata, other._plaindata);
|
||||
std_::swap(_size, other._size);
|
||||
std_::swap(_capacity, other._capacity);
|
||||
std_::swap(_plaindata, other._plaindata);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ private:
|
|||
new (newLocation) T(std_::move(*oldLocation));
|
||||
oldLocation->~T();
|
||||
}
|
||||
std::swap(_plaindata, newPlainData);
|
||||
std_::swap(_plaindata, newPlainData);
|
||||
_capacity = newCapacity;
|
||||
operator delete[](newPlainData);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue