DataBlock.hh (6762:a22a47e60c21) DataBlock.hh (6971:12cfde8f819b)
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{
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 delete [] m_data;
85 if (m_alloc) {
86 delete [] m_data;
87 }
86 m_data = data;
87 m_alloc = false;
88}
89
90inline
91void DataBlock::alloc()
92{
93 m_data = new uint8[RubySystem::getBlockSizeBytes()];

--- 78 unchanged lines hidden ---
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 ---