Changed all pointer casts to either static_cast or reinterpret_cast as appropriate.

[SVN r12574]
This commit is contained in:
John Maddock
2002-01-30 12:16:28 +00:00
parent 6463dcfb07
commit 5613d77433
6 changed files with 173 additions and 173 deletions

View File

@ -84,8 +84,8 @@ public:
node* BOOST_REGEX_CALL get_node()
{
node* new_stack = (node*)alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size);
new_stack->last = (T*)(new_stack+1);
node* new_stack = reinterpret_cast<node*>(alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size));
new_stack->last = reinterpret_cast<T*>(new_stack+1);
new_stack->start = new_stack->end = new_stack->last + block_size;
new_stack->next = 0;
return new_stack;
@ -196,13 +196,13 @@ jstack<T, Allocator>::~jstack()
{
condemned = unused;
unused = unused->next;
alloc_inst.deallocate((unsigned char*)condemned, sizeof(node) + sizeof(T) * block_size);
alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
}
while(m_stack != &base)
{
condemned = m_stack;
m_stack = m_stack->next;
alloc_inst.deallocate((unsigned char*)condemned, sizeof(node) + sizeof(T) * block_size);
alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
}
}