summaryrefslogtreecommitdiffstats
path: root/pokemod/Item.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-05-26 13:36:39 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-05-26 13:36:39 +0000
commitdc9682d704118840457aa3434711eba6e003eafc (patch)
tree40ccccb7c4a220b656ec92d61277a44380cf30bd /pokemod/Item.cpp
parent75b7d5c767428f7061365a186cb17a22de4112cc (diff)
downloadsigen-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/Item.cpp')
-rw-r--r--pokemod/Item.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp
index 40388447..b0d526a0 100644
--- a/pokemod/Item.cpp
+++ b/pokemod/Item.cpp
@@ -25,7 +25,7 @@
extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::Item::Item(unsigned _id)
+PokeGen::PokeMod::Item::Item(const unsigned _id)
{
LogCtor("Item", _id);
name = "";
@@ -37,7 +37,7 @@ PokeGen::PokeMod::Item::Item(unsigned _id)
id = _id;
}
-PokeGen::PokeMod::Item::Item(Ini &ini, unsigned _id)
+PokeGen::PokeMod::Item::Item(Ini &ini, const unsigned _id)
{
LogCtorIni("Item", _id);
ImportIni(ini, _id);
@@ -120,7 +120,7 @@ void PokeGen::PokeMod::Item::Validate(const wxListBox &output)
}
#endif
-void PokeGen::PokeMod::Item::ImportIni(Ini &ini, unsigned _id)
+void PokeGen::PokeMod::Item::ImportIni(Ini &ini, const unsigned _id)
{
LogImportStart("Item");
if (_id == UINT_MAX)
@@ -164,13 +164,13 @@ void PokeGen::PokeMod::Item::SetName(const String &n)
name = n;
}
-void PokeGen::PokeMod::Item::SetSellable(bool s)
+void PokeGen::PokeMod::Item::SetSellable(const bool s)
{
LogSetVar("Item", id, "sellable", s, name);
sellable = s;
}
-void PokeGen::PokeMod::Item::SetType(int t)
+void PokeGen::PokeMod::Item::SetType(const int t)
{
LogSetVar("Item", id, "type", t, name);
if (curPokeMod.GetItemStorage(t))
@@ -184,7 +184,7 @@ void PokeGen::PokeMod::Item::SetType(const String &t)
type = i->GetId();
}
-void PokeGen::PokeMod::Item::SetPrice(unsigned p)
+void PokeGen::PokeMod::Item::SetPrice(const unsigned p)
{
LogSetVar("Item", id, "price", p, name);
price = p;
@@ -234,7 +234,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Item::GetDescription() const
return description;
}
-PokeGen::PokeMod::ItemEffect *PokeGen::PokeMod::Item::GetItemEffect(unsigned _id)
+PokeGen::PokeMod::ItemEffect *PokeGen::PokeMod::Item::GetItemEffect(const unsigned _id)
{
LogSubmoduleFetch("Item", id, "effect", _id, name);
for (unsigned i = 0; i < GetItemEffectCount(); ++i)
@@ -252,7 +252,7 @@ unsigned PokeGen::PokeMod::Item::GetItemEffectCount() const
return effects.size();
}
-void PokeGen::PokeMod::Item::NewItemEffect()
+void PokeGen::PokeMod::Item::NewItemEffect(Ini *const ini)
{
unsigned i = 0;
// Find the first unused ID in the vector
@@ -268,7 +268,7 @@ void PokeGen::PokeMod::Item::NewItemEffect()
effects.push_back(newItemEffect);
}
-void PokeGen::PokeMod::Item::DeleteItemEffect(unsigned _id)
+void PokeGen::PokeMod::Item::DeleteItemEffect(const unsigned _id)
{
LogSubmoduleRemoveStart("Item", id, "effect", _id, name);
for (std::vector<ItemEffect>::iterator i = effects.begin(); i != effects.end(); ++i)