/
diev
/
stelegramdesktop-tdesktop
Обзор
Документация
Войти
/
diev
/
stelegramdesktop-tdesktop
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Telegram/SourceFiles/storage/serialize_common.cpp
29 строк
770 B
John Preston
Keep separate MTP::Config's for separate accounts.
23 июн 2020, 20:53
23 июн 2020, 20:53
357caf8
Код
Авторство
О чём код?
/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "storage/serialize_common.h" namespace Serialize { void writeColor(QDataStream &stream, const QColor &color) { stream << (quint32(uchar(color.red())) | (quint32(uchar(color.green())) << 8) | (quint32(uchar(color.blue())) << 16) | (quint32(uchar(color.alpha())) << 24)); } QColor readColor(QDataStream &stream) { auto value = quint32(); stream >> value; return QColor( int(value & 0xFFU), int((value >> 8) & 0xFFU), int((value >> 16) & 0xFFU), int((value >> 24) & 0xFFU)); } } // namespace Serialize