diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-18 06:00:44 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-18 06:00:44 +0000 |
| commit | d017d90324a439dfb4bd3f25d30deb672bc40fd4 (patch) | |
| tree | 7ba12ff6ec958caa0f02f5e049cb4b0d38b1e74e /general/Frac.cpp | |
| parent | 1d639b92a4487b21a29127f4fbe91d5b1d5d1952 (diff) | |
| download | sigen-d017d90324a439dfb4bd3f25d30deb672bc40fd4.tar.gz sigen-d017d90324a439dfb4bd3f25d30deb672bc40fd4.tar.xz sigen-d017d90324a439dfb4bd3f25d30deb672bc40fd4.zip | |
[FIX] Added 2008 to other copyright lines
[ADD] More .pro files for qmake
[ADD] overworld folder for the world map stuff
[ADD] Refined pokegen and pokemodr file structures
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@32 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'general/Frac.cpp')
| -rw-r--r-- | general/Frac.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/general/Frac.cpp b/general/Frac.cpp index 74d76881..539205ef 100644 --- a/general/Frac.cpp +++ b/general/Frac.cpp @@ -4,7 +4,7 @@ // Author: Ben Boeckel // Modified by: Ben Boeckel // Created: Sun Mar 18 15:25:16 2007 -// Copyright: ©2007 Nerdy Productions +// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions // Licence: // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #include "Frac.h" -void PokeGen::Frac::set(const unsigned n, const unsigned d) +void PokeGen::Frac::set(const unsigned n, const unsigned d) throw(Exception) { if ((type == Improper) || ((n < d) && (type == Proper)) || ((d < n) && (type == Over1))) { @@ -30,26 +30,26 @@ void PokeGen::Frac::set(const unsigned n, const unsigned d) denom = d; } else - throw("Frac: values conflict with type"); + throw(Exception("Frac", "values conflict with type")); } -void PokeGen::Frac::set(const unsigned n, const unsigned d, const unsigned t) +void PokeGen::Frac::set(const unsigned n, const unsigned d, const unsigned t) throw(Exception) { setType(t); set(n, d); } -void PokeGen::Frac::setNum(const unsigned n) +void PokeGen::Frac::setNum(const unsigned n) throw(Exception) { set(n, denom); } -void PokeGen::Frac::setDenom(const unsigned d) +void PokeGen::Frac::setDenom(const unsigned d) throw(Exception) { set(num, d); } -void PokeGen::Frac::setType(const unsigned t) +void PokeGen::Frac::setType(const unsigned t) throw(BoundsException) { if (t < End) { @@ -57,7 +57,7 @@ void PokeGen::Frac::setType(const unsigned t) set(1, 1); } else - throw("Frac: type out of range"); + throw(BoundsException("Frac", "type")); } void PokeGen::Frac::reduce() |
