Mercurial > fife-parpg
comparison engine/core/util/resource/pool.cpp @ 152:679ed3e15513
Deprecation: getIndex is now thrown out.
Import fife_compat for the transition.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 11 Oct 2008 12:55:41 +0000 |
parents | 823544621b5b |
children | 376b8afc9a18 |
comparison
equal
deleted
inserted
replaced
151:afcd83f7fac8 | 152:679ed3e15513 |
---|---|
147 res->addRef(); | 147 res->addRef(); |
148 } | 148 } |
149 res->setPoolId(index); | 149 res->setPoolId(index); |
150 return *res; | 150 return *res; |
151 } | 151 } |
152 | |
153 int Pool::getIndex(const std::string& filename) { | |
154 // create resource | |
155 return addResourceFromFile(filename); | |
156 } | |
157 | 152 |
158 void Pool::release(unsigned int index, bool dec) { | 153 void Pool::release(unsigned int index, bool dec) { |
159 if (index >= m_entries.size()) { | 154 if (index >= m_entries.size()) { |
160 throw IndexOverflow( __FUNCTION__ ); | 155 throw IndexOverflow( __FUNCTION__ ); |
161 } | 156 } |