IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13703


Ignore:
Timestamp:
Jun 7, 2007, 2:08:08 PM (19 years ago)
Author:
Paul Price
Message:

Don't copy TRIMSEC or BIASSEC --- they will be generated if required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConcepts.c

    r13500 r13703  
    948948                continue;
    949949            }
    950             targetCell->concepts = psMetadataCopy(targetCell->concepts, sourceCell->concepts);
     950
     951            psMetadataIterator *iter = psMetadataIteratorAlloc(sourceCell->concepts, PS_LIST_HEAD, NULL);
     952            psMetadataItem *item;       // Item from iteration
     953            while ((item = psMetadataGetAndIncrement(iter))) {
     954                psMetadataItem *new;    // New item, a copy of the old
     955                // Don't copy TRIMSEC or BIASSEC
     956                if (strcmp(item->name, "CELL.TRIMSEC") != 0 && strcmp(item->name, "CELL.BIASSEC")) {
     957                    new = psMetadataItemCopy(item);
     958                } else {
     959                    new = psMetadataItemAlloc(item->name, item->type, item->comment, NULL);
     960                }
     961                psMetadataAddItem(targetCell->concepts, new, PS_LIST_TAIL, PS_META_REPLACE);
     962                psFree(new);        // Drop reference
     963            }
     964            psFree(iter);
    951965        }
    952966    }
Note: See TracChangeset for help on using the changeset viewer.