[mapguide-trac] #1653: MgSelectionBase returns NULL instead of empty collections for certain APIs

MapGuide Open Source trac_mapguide at osgeo.org
Wed Apr 6 21:48:21 EDT 2011


#1653: MgSelectionBase returns NULL instead of empty collections for certain APIs
-----------------------+----------------------------------------------------
   Reporter:  jng      |       Owner:       
       Type:  defect   |      Status:  new  
   Priority:  low      |   Milestone:  2.3  
  Component:  General  |     Version:  2.2.0
   Severity:  trivial  |    Keywords:       
External_id:           |  
-----------------------+----------------------------------------------------
 In line 450 of SelectionBase.cpp (MgSelectionBase::GetLayers())
 {{{
 if (selLayers->GetCount() == 0)
 {
    return NULL;
 }
 }}}

 In line 482 of SelectionBase.cpp (MgSelectionBase::GetClasses(CREFSTRING
 layer))
 {{{
 if (strColl->GetCount() == 0)
 {
     return NULL;
 }
 }}}

 Shouldn't we just return the collection as-is? It will be empty anyway so
 consumers won't get anything from it.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1653>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list