Commit e47dd7e3 authored by David Jarvie's avatar David Jarvie

Update example

parent 02f68c4c
......@@ -49,8 +49,8 @@ NAMING
EXAMPLE
const Animal& ZooCage::releaseAnimal(const QString& name, Species species,
int arrivalNumber) const
Animal ZooCage::releaseAnimal(const QString& name, Species species,
int arrivalNumber) const
{
if (!name.isEmpty()
&& (arrivalNumber > mMinimumSpeciesCount && arrivalNumber < mMaximumSpeciesCount)
......@@ -61,4 +61,5 @@ const Animal& ZooCage::releaseAnimal(const QString& name, Species species,
}
if (name.isEmpty() || mUnclassifiedAnimals.contains(name))
return mUnclassifiedAnimalTypes[species];
return Animal();
}
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