Skip to content

Commit

Permalink
Add a constructor to ArbitraryLocatedData to initialise members
Browse files Browse the repository at this point in the history
Coverity 746854
  • Loading branch information
stuartm committed May 29, 2013
1 parent 516719a commit 7a1e896
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions mythtv/libs/libmyth/rssparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ class MRSSParser
QList<MRSSPeerLink> PeerLinks;
QList<MRSSScene> Scenes;

ArbitraryLocatedData() : RatingAverage(0), RatingCount(0), RatingMin(0),
RatingMax(0), Views(0), Favs(0) {}

/** Updates *this's fields according to the
* child. Some kind of merge.
*/
Expand Down Expand Up @@ -655,29 +658,27 @@ class MRSSParser
}
}

ArbitraryLocatedData result =
{
GetURL(element),
rating,
rscheme,
GetTitle(element),
GetDescription(element),
GetKeywords(element),
curl,
ctext,
raverage,
rcount,
rmin,
rmax,
views,
favs,
tags,
GetThumbnails(element),
GetCredits(element),
GetComments(element),
GetPeerLinks(element),
GetScenes(element)
};
ArbitraryLocatedData result;
result.URL = GetURL(element);
result.Rating = rating;
result.RatingScheme = rscheme;
result.Title = GetTitle(element);
result.Description = GetDescription(element);
result.Keywords = GetKeywords(element);
result.CopyrightURL = curl;
result.CopyrightText = ctext;
result.RatingAverage = raverage;
result.RatingCount = rcount;
result.RatingMin = rmin;
result.RatingMax = rmax;
result.Views = views;
result.Favs = favs;
result.Tags = tags;
result.Thumbnails = GetThumbnails(element);
result.Credits = GetCredits(element);
result.Comments = GetComments(element);
result.PeerLinks = GetPeerLinks(element);
result.Scenes = GetScenes(element);

return result;
}
Expand Down

0 comments on commit 7a1e896

Please sign in to comment.