@@ -25,11 +25,6 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
25
25
26
26
// //////////////////////////////////////////////////////////////////////////////
27
27
28
- #define UINDEX_MAX UINT32_MAX
29
- #define UINDEX_MIN UINT32_MIN
30
- #define UINTPTR_MAX UINT32_MAX
31
- #define UINTPTR_MIN UINT32_MIN
32
-
33
28
class MCStackIdCache
34
29
{
35
30
public:
@@ -117,7 +112,7 @@ MCStackIdCache::~MCStackIdCache(void)
117
112
if (t_bucket == UINTPTR_MIN || t_bucket == UINTPTR_MAX)
118
113
continue ;
119
114
120
- MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<MCObject >*>(m_buckets[i]);
115
+ MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<>*>(m_buckets[i]);
121
116
t_handle.ExternalRelease ();
122
117
}
123
118
@@ -170,8 +165,8 @@ void MCStackIdCache::UncacheObject(MCObjectHandle p_object)
170
165
171
166
if (t_target_slot != UINDEX_MAX)
172
167
{
173
- p_object.ExternalRelease ();
174
168
p_object -> setinidcache (false );
169
+ MCObjectHandle (reinterpret_cast <MCObjectProxy<>*>(m_buckets[t_target_slot])).ExternalRelease ();
175
170
m_buckets[t_target_slot] = UINTPTR_MAX;
176
171
m_count -= 1 ;
177
172
}
@@ -186,7 +181,7 @@ MCObjectHandle MCStackIdCache::FindObject(uint32_t p_id)
186
181
t_target_slot = FindBucketIfExists (p_id, t_hash);
187
182
188
183
if (t_target_slot != UINDEX_MAX)
189
- return reinterpret_cast <MCObjectProxy<MCObject >*>(m_buckets[t_target_slot]);
184
+ return MCObjectHandle ( reinterpret_cast <MCObjectProxy<>*>(m_buckets[t_target_slot]) );
190
185
191
186
return nil;
192
187
}
@@ -224,7 +219,7 @@ uindex_t MCStackIdCache::FindBucket(uint32_t p_id, hash_t p_hash, bool p_only_if
224
219
225
220
if (t_bucket != UINTPTR_MAX)
226
221
{
227
- MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<MCObject >*>(t_bucket);
222
+ MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<>*>(t_bucket);
228
223
229
224
if (t_handle)
230
225
{
@@ -336,7 +331,7 @@ bool MCStackIdCache::RehashBuckets(index_t p_new_item_count_delta)
336
331
{
337
332
if (t_old_buckets[i] != UINTPTR_MIN && t_old_buckets[i] != UINTPTR_MAX)
338
333
{
339
- MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<MCObject >*>(t_old_buckets[i]);
334
+ MCObjectHandle t_handle = reinterpret_cast <MCObjectProxy<>*>(t_old_buckets[i]);
340
335
341
336
// If the object is dead, don't transfer it to the new table
342
337
if (!t_handle)
0 commit comments