diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-05-26 13:36:39 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-05-26 13:36:39 +0000 |
| commit | dc9682d704118840457aa3434711eba6e003eafc (patch) | |
| tree | 40ccccb7c4a220b656ec92d61277a44380cf30bd /pokemod/Frac.cpp | |
| parent | 75b7d5c767428f7061365a186cb17a22de4112cc (diff) | |
| download | sigen-dc9682d704118840457aa3434711eba6e003eafc.tar.gz sigen-dc9682d704118840457aa3434711eba6e003eafc.tar.xz sigen-dc9682d704118840457aa3434711eba6e003eafc.zip | |
const arguments where possible, EggGroup, Move beginnings
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@15 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Frac.cpp')
| -rw-r--r-- | pokemod/Frac.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pokemod/Frac.cpp b/pokemod/Frac.cpp index 1ce7be90..0553a534 100644 --- a/pokemod/Frac.cpp +++ b/pokemod/Frac.cpp @@ -23,7 +23,7 @@ #include "Frac.h"
-PokeGen::PokeMod::Frac::Frac(bool i)
+PokeGen::PokeMod::Frac::Frac(const bool i)
{
Log("Frac: Initializing", PM_DEBUG_DEBUG);
num = 1;
@@ -31,7 +31,7 @@ PokeGen::PokeMod::Frac::Frac(bool i) improper = i;
}
-PokeGen::PokeMod::Frac::Frac(unsigned n, unsigned d, bool i)
+PokeGen::PokeMod::Frac::Frac(const unsigned n, const unsigned d, const bool i)
{
Log(String("Frac: Initializing as %u/%u (%u)", n, d, i), PM_DEBUG_DEBUG);
Set(n, d, i);
@@ -60,7 +60,7 @@ void PokeGen::PokeMod::Frac::ExportIni(std::ofstream &fout, const String &val) Log(String("Frac Export: Finished %u/%u as %s", num, denom, val.c_str()), PM_DEBUG_INFO);
}
-void PokeGen::PokeMod::Frac::Set(unsigned n, unsigned d)
+void PokeGen::PokeMod::Frac::Set(const unsigned n, const unsigned d)
{
Log(String("Frac: Setting to %u/%u", n, d), PM_DEBUG_DEBUG);
SetDenom(d);
@@ -68,13 +68,13 @@ void PokeGen::PokeMod::Frac::Set(unsigned n, unsigned d) Reduce();
}
-void PokeGen::PokeMod::Frac::Set(unsigned n, unsigned d, bool i)
+void PokeGen::PokeMod::Frac::Set(const unsigned n, const unsigned d, const bool i)
{
SetImproper(i);
Set(n, d);
}
-void PokeGen::PokeMod::Frac::SetNum(unsigned n)
+void PokeGen::PokeMod::Frac::SetNum(const unsigned n)
{
// Make sure the numerator is less than the denominator if proper
if ((n <= denom) || improper)
@@ -86,7 +86,7 @@ void PokeGen::PokeMod::Frac::SetNum(unsigned n) Log(String("Frac: Setting tried to set numerator to %u when denominator is %u", n, denom), PM_DEBUG_DEBUG);
}
-void PokeGen::PokeMod::Frac::SetDenom(unsigned d)
+void PokeGen::PokeMod::Frac::SetDenom(const unsigned d)
{
// Make sure the denominator isn't 0
if (d)
@@ -104,7 +104,7 @@ void PokeGen::PokeMod::Frac::SetDenom(unsigned d) }
}
-void PokeGen::PokeMod::Frac::SetImproper(bool i)
+void PokeGen::PokeMod::Frac::SetImproper(const bool i)
{
Log(String("Frac: Setting as %s", i ? "improper" : "proper"), PM_DEBUG_DEBUG);
improper = i;
|
