C4ValueMapNames: mark GetItemNr const

It doesn't change anything, so callers don't need a nonconst object.
liquid_container
Nicolas Hake 2016-04-23 17:13:48 +02:00
parent 607eb8e246
commit 96223f154c
2 changed files with 2 additions and 2 deletions

View File

@ -466,7 +466,7 @@ int32_t C4ValueMapNames::AddName(const char *pnName)
return iSize-1;
}
int32_t C4ValueMapNames::GetItemNr(const char *strName)
int32_t C4ValueMapNames::GetItemNr(const char *strName) const
{
for (int32_t i = 0; i < iSize; i++)
if (SEqual(pNames[i], strName))

View File

@ -118,7 +118,7 @@ public:
// returns the nr of the given name
// (= nr of value in "child" data lists)
// returns -1 if no item with given name exists
int32_t GetItemNr(const char *strName);
int32_t GetItemNr(const char *strName) const;
// get name by index; awway bounds not checked
const char *GetItemUnsafe(int32_t idx) const { return pNames[idx]; }