Changeset 646:d2096011fcda


Ignore:
Timestamp:
05/15/08 20:31:32 (2 years ago)
Author:
Howard Butler <hobu.inc@…>
Branch:
default
Convert:
svn:1766ff46-f334-0410-ab20-d63176f87757/trunk@713
Message:

add DeleteVLR method and update GetVLR method to use uint32_t for the index variable

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/liblas/lasheader.hpp

    r641 r646  
    293293 
    294294    void AddVLR(LASVLR const& v); 
    295     LASVLR const& GetVLR(int index) const; 
     295    LASVLR const& GetVLR(uint32_t index) const; 
     296    void DeleteVLR(uint32_t index); 
    296297     
    297298private: 
  • src/lasheader.cpp

    r641 r646  
    498498{ 
    499499    m_vlrs.push_back(v); 
    500 } 
    501 LASVLR const& LASHeader::GetVLR(int index) const { 
     500    m_dataRecordLen = m_vlrs.size(); 
     501} 
     502 
     503LASVLR const& LASHeader::GetVLR(uint32_t index) const { 
    502504    return m_vlrs[index]; 
     505} 
     506 
     507void LASHeader::DeleteVLR(uint32_t index) { 
     508     
     509    if (index >= m_vlrs.size()) 
     510        throw std::out_of_range("index is out of range"); 
     511         
     512    m_vlrs.erase(m_vlrs.begin() + index); 
     513    m_dataRecordLen = m_vlrs.size(); 
     514     
    503515} 
    504516void LASHeader::Init() 
Note: See TracChangeset for help on using the changeset viewer.