summaryrefslogtreecommitdiff
path: root/src/object2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-04-14 06:39:21 +0200
committerBardur Arantsson <bardur@scientician.net>2015-04-14 06:39:21 +0200
commite8345c7da1e3b62dec011798a03d25c2f23f9d60 (patch)
tree2ebac391fc6dc86fd64b6ae4f17ce19adf79f978 /src/object2.cc
parent0a66e1537dc7bb5500d7bf2203144ea44b167f45 (diff)
Add a few "const" qualifiers to object-related functions
Diffstat (limited to 'src/object2.cc')
-rw-r--r--src/object2.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/object2.cc b/src/object2.cc
index 7093b94e..b8edb7ce 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -878,7 +878,7 @@ bool object_tried_p(object_type const *o_ptr)
* Return the "value" of an "unknown" item
* Make a guess at the value of non-aware items
*/
-static s32b object_value_base(object_type *o_ptr)
+static s32b object_value_base(object_type const *o_ptr)
{
object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -942,7 +942,7 @@ static s32b object_value_base(object_type *o_ptr)
}
/* Return the value of the flags the object has... */
-s32b flag_cost(object_type * o_ptr, int plusses)
+s32b flag_cost(object_type const * o_ptr, int plusses)
{
s32b total = 0;
u32b f1, f2, f3, f4, f5, esp;
@@ -1178,7 +1178,7 @@ s32b flag_cost(object_type * o_ptr, int plusses)
*
* Every wearable item with a "pval" bonus is worth extra (see below).
*/
-s32b object_value_real(object_type *o_ptr)
+s32b object_value_real(object_type const *o_ptr)
{
s32b value;
@@ -1492,7 +1492,7 @@ s32b object_value_real(object_type *o_ptr)
* Note that discounted items stay discounted forever, even if
* the discount is "forgotten" by the player via memory loss.
*/
-s32b object_value(object_type *o_ptr)
+s32b object_value(object_type const *o_ptr)
{
s32b value;
@@ -1548,7 +1548,7 @@ s32b object_value(object_type *o_ptr)
*
* Chests, and activatable items, never stack (for various reasons).
*/
-bool_ object_similar(object_type *o_ptr, object_type *j_ptr)
+bool_ object_similar(object_type const *o_ptr, object_type const *j_ptr)
{
int total = o_ptr->number + j_ptr->number;
u32b f1, f2, f3, f4, f5, esp, f11, f12, f13, f14, esp1, f15;
@@ -5805,7 +5805,7 @@ void inc_stack_size_ex(int item, int delta, optimize_flag opt, describe_flag des
/*
* Check if we have space for an item in the pack without overflow
*/
-bool_ inven_carry_okay(object_type *o_ptr)
+bool_ inven_carry_okay(object_type const *o_ptr)
{
int j;