Changeset 1610:d4dc6b81246b


Ignore:
Timestamp:
03/02/10 15:48:30 (5 months ago)
Author:
Mateusz Loskot <mateusz@…>
Branch:
default
Message:

In las2oci.cpp, replaced post-increment with pre-increment for iterators, TODO comment where possible memory leak may occur (cannot test myself), missing include <vector>.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/las2oci.cpp

    r1601 r1610  
    1919#include <exception> 
    2020#include <algorithm> 
     21#include <vector> 
    2122#include <cctype> 
    2223#include <cmath> 
     
    392393    std::vector<liblas::uint8_t> point_data; 
    393394     
    394     for (i=ids.begin(); i!=ids.end(); i++)  
     395    for (i=ids.begin(); i!=ids.end(); ++i)  
    395396    { 
    396397        SpatialIndex::id_type id = *i; 
     
    405406            if (!gotdata) { throw std::runtime_error("Unable to fetch Point Data"); exit(1);} 
    406407            std::vector<liblas::uint8_t>::const_iterator d; 
    407             for (d = point_data.begin(); d!=point_data.end(); d++) { 
     408            for (d = point_data.begin(); d!=point_data.end(); ++d) { 
    408409                data.push_back(*d); 
    409410            } 
     
    534535    b->num_points[index] = (long)ids.size(); 
    535536     
     537    // TODO: This probably is a memory leak if the gotdata == false --mloskot 
    536538    std::vector<liblas::uint8_t>* blob = new std::vector<liblas::uint8_t>; 
    537539     
     
    764766                ) 
    765767{ 
    766  
    767      
    768768    std::list<LASQueryResult>::const_iterator i; 
    769  
    770  
    771769 
    772770    long commit_interval = 1000; 
Note: See TracChangeset for help on using the changeset viewer.