Changeset 1157:d8569269899f


Ignore:
Timestamp:
04/16/09 09:11:33 (16 months ago)
Author:
Mateusz Loskot <mateusz@…>
Branch:
default
Convert:
svn:1766ff46-f334-0410-ab20-d63176f87757/trunk@1222
Message:
  • Use const mask in LASClassification.
  • Added a couple of new test cases for LASClassification.
  • Updated build/msvc90/las2ogr project.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • build/msvc90/las2ogr/las2ogr.vcproj

    r904 r1157  
    22<VisualStudioProject 
    33        ProjectType="Visual C++" 
    4         Version="8.00" 
     4        Version="9.00" 
    55        Name="las2ogr" 
    66        ProjectGUID="{0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}" 
    77        RootNamespace="las2ogr" 
    88        Keyword="Win32Proj" 
     9        TargetFrameworkVersion="131072" 
    910        > 
    1011        <Platforms> 
     
    2122                        IntermediateDirectory="$(ConfigurationName)" 
    2223                        ConfigurationType="1" 
    23                         InheritedPropertySheets="..\liblas.vsprops;.\las2ogr.vsprops" 
     24                        InheritedPropertySheets="..\liblas.vsprops" 
    2425                        CharacterSet="1" 
    2526                        > 
     
    6667                                GenerateDebugInformation="true" 
    6768                                SubSystem="1" 
     69                                RandomizedBaseAddress="1" 
     70                                DataExecutionPrevention="0" 
    6871                                TargetMachine="1" 
    6972                        /> 
     
    8790                        /> 
    8891                        <Tool 
    89                                 Name="VCWebDeploymentTool" 
    90                         /> 
    91                         <Tool 
    9292                                Name="VCPostBuildEventTool" 
    9393                        /> 
     
    9898                        IntermediateDirectory="$(ConfigurationName)" 
    9999                        ConfigurationType="1" 
    100                         InheritedPropertySheets="..\liblas.vsprops;.\las2ogr.vsprops" 
     100                        InheritedPropertySheets="..\liblas.vsprops" 
    101101                        CharacterSet="1" 
    102102                        WholeProgramOptimization="1" 
     
    142142                                OptimizeReferences="2" 
    143143                                EnableCOMDATFolding="2" 
     144                                RandomizedBaseAddress="1" 
     145                                DataExecutionPrevention="0" 
    144146                                TargetMachine="1" 
    145147                        /> 
     
    163165                        /> 
    164166                        <Tool 
    165                                 Name="VCWebDeploymentTool" 
    166                         /> 
    167                         <Tool 
    168167                                Name="VCPostBuildEventTool" 
    169168                        /> 
  • build/msvc90/liblas.sln

    r1099 r1157  
    6262        EndProjectSection 
    6363EndProject 
     64Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "las2ogr", "las2ogr\las2ogr.vcproj", "{0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}" 
     65        ProjectSection(ProjectDependencies) = postProject 
     66                {208417AE-D08E-4938-AC26-A16ABD55AA5B} = {208417AE-D08E-4938-AC26-A16ABD55AA5B} 
     67        EndProjectSection 
     68EndProject 
    6469Global 
    6570        GlobalSection(SolutionConfigurationPlatforms) = preSolution 
     
    104109                {C78B8A0D-12CE-49D6-8615-96B9735564D5}.Release|Win32.ActiveCfg = Release|Win32 
    105110                {C78B8A0D-12CE-49D6-8615-96B9735564D5}.Release|Win32.Build.0 = Release|Win32 
     111                {0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}.Debug|Win32.ActiveCfg = Debug|Win32 
     112                {0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}.Debug|Win32.Build.0 = Debug|Win32 
     113                {0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}.Release|Win32.ActiveCfg = Release|Win32 
     114                {0CE46FF7-F5B6-4EE2-B8EE-37B5555CAC62}.Release|Win32.Build.0 = Release|Win32 
    106115        EndGlobalSection 
    107116        GlobalSection(SolutionProperties) = preSolution 
  • include/liblas/lasclassification.hpp

    r1155 r1157  
    131131    { 
    132132        bitset_type bits(m_flags); 
    133         bitset_type const mask(class_table_size - 1); 
     133        bitset_type const mask(static_cast<unsigned long>(class_table_size) - 1); 
    134134        bits &= mask; 
    135135 
  • test/unit/lasclassification_test.cpp

    r1155 r1157  
    378378        ensure_equals(m_default.GetClassName(), cn); 
    379379    } 
     380 
     381    template<> 
     382    template<> 
     383    void to::test<21>() 
     384    { 
     385        std::string const cn("Low Point (noise)"); 
     386        m_default.SetClass(7); 
     387        ensure_equals(m_default.GetClassName(), cn); 
     388    } 
     389 
     390    template<> 
     391    template<> 
     392    void to::test<22>() 
     393    { 
     394        std::string const cn("Reserved for ASPRS Definition"); 
     395        m_default.SetClass(31); 
     396        ensure_equals(m_default.GetClassName(), cn); 
     397    } 
     398 
     399    template<> 
     400    template<> 
     401    void to::test<23>() 
     402    { 
     403        try 
     404        { 
     405            m_default.SetClass(32); 
     406            fail("std::out_of_range not thrown but expected"); 
     407        } 
     408        catch (std::out_of_range const& e) 
     409        { 
     410            ensure(e.what(), true); 
     411        } 
     412        catch (...) 
     413        { 
     414            fail("unhandled exception expected"); 
     415        } 
     416    } 
    380417} 
Note: See TracChangeset for help on using the changeset viewer.