Opened 13 years ago

Closed 12 years ago

#1653 closed defect (wontfix)

MgSelectionBase returns NULL instead of empty collections for certain APIs

Reported by: jng Owned by:
Priority: low Milestone: 2.3
Component: General Version: 2.2.0
Severity: trivial Keywords:
Cc: External ID:

Description

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.

Change History (1)

comment:1 by jng, 12 years ago

Resolution: wontfix
Status: newclosed

No point changing what's ingrained now.

Note: See TracTickets for help on using tickets.