1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 68 unchanged lines hidden (view full) --- 77 78bool operator==(const DataBlock& obj1, const DataBlock& obj2); 79 80// inline functions for speed 81 82inline 83void DataBlock::assign(uint8* data) 84{ |
85 if (m_alloc) { 86 delete [] m_data; 87 } |
88 m_data = data; 89 m_alloc = false; 90} 91 92inline 93void DataBlock::alloc() 94{ 95 m_data = new uint8[RubySystem::getBlockSizeBytes()]; --- 78 unchanged lines hidden --- |