Fix uninitialized variables
This commit is contained in:
@@ -134,8 +134,8 @@ QDataStream &operator<<(QDataStream &s, const SmartPlaylistSearch &search) {
|
||||
|
||||
QDataStream &operator>>(QDataStream &s, SmartPlaylistSearch &search) {
|
||||
|
||||
quint8 sort_type, sort_field, search_type;
|
||||
qint32 limit;
|
||||
quint8 sort_type = 0, sort_field = 0, search_type = 0;
|
||||
qint32 limit = 0;
|
||||
|
||||
s >> search.terms_ >> sort_type >> sort_field >> limit >> search_type;
|
||||
search.sort_type_ = SmartPlaylistSearch::SortType(sort_type);
|
||||
|
||||
@@ -456,7 +456,7 @@ QDataStream &operator<<(QDataStream &s, const SmartPlaylistSearchTerm &term) {
|
||||
|
||||
QDataStream &operator>>(QDataStream &s, SmartPlaylistSearchTerm &term) {
|
||||
|
||||
quint8 field, op, date;
|
||||
quint8 field = 0, op = 0, date = 0;
|
||||
s >> field >> op >> term.value_ >> term.second_value_ >> date;
|
||||
term.field_ = SmartPlaylistSearchTerm::Field(field);
|
||||
term.operator_ = SmartPlaylistSearchTerm::Operator(op);
|
||||
|
||||
Reference in New Issue
Block a user