Permalink
Browse files

Start from 1 when passing arrays

Signed-off-by: KillerFrca <killerfrca@gmail.com>
  • Loading branch information...
1 parent d88a2b8 commit 0081bca46dbbcda14868426480f3ae8d968ece8f @jkrecek committed Jan 20, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Series/Series.cpp
View
@@ -90,9 +90,9 @@ Episode* Series::GetOrCreateEpisode(EpisodeOrder epOrder)
EpisodeList Series::GetAllEpisodes()
{
EpisodeList allEp;
- for(int sId = 0; sId < aSeasons_m.size(); ++sId)
+ for(int sId = 1; sId <= aSeasons_m.size(); ++sId)
if (Season* season = GetSeason(sId))
- for(int eId = 0; eId < season->GetEpisodes().size(); ++eId)
+ for(int eId = 1; eId <= season->GetEpisodes().size(); ++eId)
if (Episode* episode = season->GetEpisode(eId))
allEp.push_back(episode);
@@ -112,7 +112,7 @@ QString Series::FormValueString()
if (!GetSeasons().empty())
{
line.append("Contains seasons: ");
- for(int sId = 0; sId < aSeasons_m.size(); ++sId)
+ for(int sId = 1; sId <= aSeasons_m.size(); ++sId)
if (GetSeason(sId))
line.append(QString::number(sId)+", ");
line.remove(line.lastIndexOf(","), 2);

0 comments on commit 0081bca

Please sign in to comment.