Ignore:
Timestamp:
Mar 10, 2012, 11:31:26 PM (13 years ago)
Author:
ldelgass
Message:

Misc. cleanups. Make libs look in nanovis src dir for includes, so that libs
can use Trace.h. Trace.h now includes config.h, so the WANT_TRACE define can
be placed there. The Makefile now has the flag for enabling the pointset
code, since it also switches which objects are compiled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/R2/src/R2IndexBuffer.cpp

    r2840 r2841  
    55#include <R2/graphics/R2IndexBuffer.h>
    66
    7 R2IndexBuffer::R2IndexBuffer(int indexCount, int* data, bool copy)
    8 : _indexCount(indexCount)
     7R2IndexBuffer::R2IndexBuffer(int indexCount, int* data, bool copy) :
     8    _indexCount(indexCount)
    99{
    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    }
    1916}
    20 
    2117
    2218R2IndexBuffer::~R2IndexBuffer()
    2319{
    24         if (_data)
    25         {
    26                 free(_data);
    27         }
     20    if (_data) {
     21        free(_data);
     22    }
    2823}
Note: See TracChangeset for help on using the changeset viewer.