summaryrefslogtreecommitdiffstats
path: root/src/UI/EnchantingWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/UI/EnchantingWindow.cpp')
-rw-r--r--src/UI/EnchantingWindow.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/UI/EnchantingWindow.cpp b/src/UI/EnchantingWindow.cpp
index 15d27fc63..9ebb70f32 100644
--- a/src/UI/EnchantingWindow.cpp
+++ b/src/UI/EnchantingWindow.cpp
@@ -26,25 +26,9 @@ cEnchantingWindow::cEnchantingWindow(Vector3i a_BlockPos, const AString & a_Titl
-void cEnchantingWindow::SetProperty(short a_Property, short a_Value, cPlayer & a_Player)
+void cEnchantingWindow::SetProperty(size_t a_Property, short a_Value)
{
- ASSERT(a_Property >= 0);
- if (static_cast<size_t>(a_Property) < m_PropertyValue.size())
- {
- m_PropertyValue[a_Property] = a_Value;
- }
-
- Super::SetProperty(a_Property, a_Value, a_Player);
-}
-
-
-
-
-
-void cEnchantingWindow::SetProperty(short a_Property, short a_Value)
-{
- ASSERT(a_Property >= 0);
- if (static_cast<size_t>(a_Property) < m_PropertyValue.size())
+ if (a_Property < m_PropertyValue.size())
{
m_PropertyValue[a_Property] = a_Value;
}
@@ -56,14 +40,9 @@ void cEnchantingWindow::SetProperty(short a_Property, short a_Value)
-short cEnchantingWindow::GetProperty(short a_Property)
+short cEnchantingWindow::GetProperty(size_t a_Property)
{
- if ((a_Property < 0) || (static_cast<size_t>(a_Property) >= m_PropertyValue.size()))
- {
- ASSERT(!"a_Property is invalid");
- return 0;
- }
-
+ ASSERT(a_Property < m_PropertyValue.size());
return m_PropertyValue[a_Property];
}