mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Changed exception to Unsolved to fit with naming convention
This commit is contained in:
@@ -68,7 +68,7 @@ void Problem3::reset(){
|
||||
std::string Problem3::getString() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
std::stringstream results;
|
||||
results << "The largest factor of the number " << GOAL_NUMBER << " is " << factors[factors.size() - 1];
|
||||
@@ -79,7 +79,7 @@ std::string Problem3::getString() const{
|
||||
std::vector<uint64_t> Problem3::getFactors() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return factors;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ std::vector<uint64_t> Problem3::getFactors() const{
|
||||
uint64_t Problem3::getLargestFactor() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
|
||||
return *factors.end();
|
||||
@@ -98,7 +98,7 @@ uint64_t Problem3::getLargestFactor() const{
|
||||
uint64_t Problem3::getGoalNumber() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return GOAL_NUMBER;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user