Changeset 13825 for trunk/FACT++


Ignore:
Timestamp:
05/23/12 10:30:21 (12 years ago)
Author:
tbretz
Message:
Fixed the size of the FEEDBACK/DEVIATION and fixed a warning of mixed delete / delete [] by valgrind
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r13824 r13825  
    12541254        }
    12551255
    1256         delete fEventData;
     1256        delete [] reinterpret_cast<char*>(fEventData);
    12571257        fEventData = reinterpret_cast<EVENT*>(new char[d.size()]);
    12581258        memcpy(fEventData, d.ptr<void>(), d.size());
     
    22762276    void handleFeedbackDeviation(const DimData &d)
    22772277    {
    2278         if (!CheckSize(d, 2*416*sizeof(float)+2))
     2278        if (!CheckSize(d, (2*416+2)*sizeof(float)))
    22792279            return;
    22802280
     
    42434243            delete i->second;
    42444244
    4245         delete fEventData;
     4245        // This is allocated as a chuck of chars
     4246        delete [] reinterpret_cast<char*>(fEventData);
    42464247    }
    42474248};
Note: See TracChangeset for help on using the changeset viewer.