- Timestamp:
- Aug 26, 2010, 9:18:39 AM (16 years ago)
- Location:
- branches/sc_branches/trunkTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/trunkTest
- Property svn:mergeinfo changed
-
branches/sc_branches/trunkTest/Ohana
- Property svn:mergeinfo deleted
-
branches/sc_branches/trunkTest/Ohana/src/opihi/dvo/ImageSelection.c
r28955 r29060 38 38 /* free loaded images */ 39 39 void FreeImageSelection () { 40 if (image != NULL) free(image);40 if (image != NULL) FreeImages(image); 41 41 if (subset != NULL) free (subset); 42 42 image = NULL; … … 47 47 Image *MatchImage (unsigned int time, short int source, unsigned int imageID) { 48 48 49 int m ;49 int m = -1; 50 50 51 51 if ((imageID != 0) && (imageID < Nimage)) { 52 m = (int) imageID - 1; 53 } else { 52 // imageID is in range for the array of images. If the table is still in order and 53 // no images have been deleted the index of the image we are looking for will be imageID - 1 54 // If this is the case, we have it. Otherwise we'll have to go search for it below 55 int guess = (int) imageID - 1; 56 if (image[guess].imageID == imageID) { 57 m = guess; 58 } 59 } 60 if (m == -1) { 54 61 m = match_image_subset (image, subset, Nsubset, time, source); 55 62 }
Note:
See TracChangeset
for help on using the changeset viewer.
