- Timestamp:
- Mar 10, 2012, 11:31:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/R2/src/R2IndexBuffer.cpp
r2840 r2841 5 5 #include <R2/graphics/R2IndexBuffer.h> 6 6 7 R2IndexBuffer::R2IndexBuffer(int indexCount, int* data, bool copy) 8 :_indexCount(indexCount)7 R2IndexBuffer::R2IndexBuffer(int indexCount, int* data, bool copy) : 8 _indexCount(indexCount) 9 9 { 10 if (copy) 11 { 12 _data = (int*) malloc(sizeof(int) * indexCount); 13 memcpy(_data, data, sizeof(int) * indexCount); 14 } 15 else 16 { 17 _data = data; 18 } 10 if (copy) { 11 _data = (int*)malloc(sizeof(int) * indexCount); 12 memcpy(_data, data, sizeof(int) * indexCount); 13 } else { 14 _data = data; 15 } 19 16 } 20 21 17 22 18 R2IndexBuffer::~R2IndexBuffer() 23 19 { 24 if (_data) 25 { 26 free(_data); 27 } 20 if (_data) { 21 free(_data); 22 } 28 23 }
Note: See TracChangeset
for help on using the changeset viewer.