Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 3053485d authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Protocol: minor optimization

parent 668944f0
......@@ -256,17 +256,15 @@ inline DataStream &DataStream::operator>>(QDateTime &dt)
// Inline functions
template<typename T>
inline Akonadi::Protocol::DataStream &operator<<(Akonadi::Protocol::DataStream &stream, const QFlags<T> &flags)
inline Akonadi::Protocol::DataStream &operator<<(Akonadi::Protocol::DataStream &stream, QFlags<T> flags)
return stream << (int) flags;
return stream << static_cast<typename QFlags<T>::Int>(flags);
template<typename T>
inline Akonadi::Protocol::DataStream &operator>>(Akonadi::Protocol::DataStream &stream, QFlags<T> &flags)
int i;
stream >> i;
flags = QFlags<T>(i);
stream >> reinterpret_cast<typename QFlags<T>::Int&>(flags);
return stream;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment