2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

New empty user/chat photos: with filled background and initials.

This commit is contained in:
John Preston
2016-12-29 13:03:51 +04:00
parent 204d91d567
commit 1d8e76aa08
35 changed files with 370 additions and 176 deletions

View File

@@ -320,21 +320,24 @@ inline T snap(const T &v, const T &_min, const T &_max) {
template <typename T>
class ManagedPtr {
public:
ManagedPtr() : ptr(0) {
}
ManagedPtr(T *p) : ptr(p) {
ManagedPtr() = default;
ManagedPtr(T *p) : _data(p) {
}
T *operator->() const {
return ptr;
return _data;
}
T *v() const {
return ptr;
return _data;
}
explicit operator bool() const {
return _data != nullptr;
}
protected:
using Parent = ManagedPtr<T>;
T *_data = nullptr;
T *ptr;
typedef ManagedPtr<T> Parent;
};
QString translitRusEng(const QString &rus);