Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old March 9, 2009, 16:40   #11
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Originally Posted by PaulBlay View Post
Is this sort of thing why find_inven is used in Angband's store.c with
static int find_inven(const object_type *o_ptr)

I couldn't work out what that 'const' was for.
There is an intentional inconsistency with const. When you use const on a pointer, it means that you will not change what the pointer is pointing to, but you can change the pointer itself! Unless you were told in advance, you could not help but be confused. P.S. Don't change the pointer itself either; typically that is a bad idea.
PowerDiver is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DaJAngband hacking: help with the code (please, I wont ask much!) will_asher Variants 19 April 21, 2008 02:41
DaJAngband -I'm in over my head will_asher Idle chatter 15 February 27, 2008 10:04
Announce: DaJAngband v1.0.03 will_asher Variants 4 February 6, 2008 21:23
DaJAngband: new object question will_asher Variants 4 December 13, 2007 04:18
Stat hacking Old Man Vanilla 1 October 12, 2007 16:13

All times are GMT +1. The time now is 02:15.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.