2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-01 11:22:00 +00:00

Isolate lib_base library. Use crl::time in getms.

This commit is contained in:
John Preston
2018-08-08 23:11:28 +03:00
parent cb371f09ac
commit 64b8adb3d0
23 changed files with 267 additions and 157 deletions

View File

@@ -25,3 +25,14 @@ inline constexpr size_t array_size(const Type(&)[Size]) {
}
} // namespace base
template <typename T>
inline void accumulate_max(T &a, const T &b) { if (a < b) a = b; }
template <typename T>
inline void accumulate_min(T &a, const T &b) { if (a > b) a = b; }
template <size_t Size>
QLatin1String qstr(const char(&string)[Size]) {
return QLatin1String(string, Size - 1);
}