Changeset 8322

Show
Ignore:
Timestamp:
23/12/11 12:56:18 (5 months ago)
Author:
westram
Message:
  • clang-fix: replace auto-arrays of non-POD types by dynamic memory
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/RNACMA/AlignedSequenceLoader.cxx

    r7898 r8322  
    5252                string sequence = GB_read_string(gb_data); 
    5353 
    54                 string seq_as_vec[MSA_len]; 
    55                 int k = 0; 
     54                string *seq_as_vec = new string[MSA_len]; 
     55                int     k          = 0; 
    5656                for (string::iterator i = sequence.begin(); i != sequence.end(); ++i) { 
    5757                    switch (*i) { 
     
    8787                assert((size_t)k == MSA_len); 
    8888                vector<string> seq_vector(&seq_as_vec[0], &seq_as_vec[k]); 
     89                delete [] seq_as_vec; 
    8990 
    9091                seqs->push_back(seq_vector); 
  • trunk/WINDOW/aw_device.hxx

    r7931 r8322  
    551551    // @@@ rename to 'polygone' and pass 'filled' parameter 
    552552    bool filled_area(int gc, int npoints, const AW_pos *points, AW_bitset filteri = AW_ALL_DEVICES_SCALED)  { 
    553         AW::Position pos[npoints]; 
     553        AW::Position *pos = new AW::Position[npoints]; 
    554554        for (int n = 0; n<npoints; ++n) { 
    555555            pos[n].setx(points[n*2]); 
    556556            pos[n].sety(points[n*2+1]); 
    557557        } 
    558         return filled_area_impl(gc, npoints, pos, filteri); 
     558        bool result = filled_area_impl(gc, npoints, pos, filteri); 
     559        delete [] pos; 
     560        return result; 
    559561    } 
    560562    bool filled_area(int gc, int npos, const AW::Position *pos, AW_bitset filteri = AW_ALL_DEVICES_SCALED)  {