mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-07 01:23:57 -05:00
Changed exception to Unsolved to fit with naming convention
This commit is contained in:
@@ -89,7 +89,7 @@ void Problem4::reset(){
|
||||
std::string Problem4::getString() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
//Print the results
|
||||
std::stringstream results;
|
||||
@@ -101,7 +101,7 @@ std::string Problem4::getString() const{
|
||||
std::vector<uint64_t> Problem4::getPalindromes() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return palindromes;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ std::vector<uint64_t> Problem4::getPalindromes() const{
|
||||
uint64_t Problem4::getLargestPalindrome() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return *(palindromes.end() - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user